-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not encode booleans with XMLEncoder #306
Conversation
Ik vertrouw dit niet helemaal. Maar ik heb gezien dat het success checkpoint in mijn test nu "true" laat zien, geen XML code. Dat was tenminste zo een paar commits geleden. Sindsdien heb ik een paar dingen toegevoegd... |
@@ -48,6 +51,7 @@ | |||
* @author Jaco de Groot | |||
*/ | |||
public class MessageEncoderImpl implements MessageEncoder { | |||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dit is zonde, je weet immers de classname al...
@@ -69,7 +73,10 @@ public ToStringResult toString(Object message, String charset) { | |||
} else if (message instanceof String) { | |||
toStringResult = new ToStringResult((String)message, null); | |||
} else { | |||
if (message instanceof byte[]) { | |||
if (message instanceof Boolean) { | |||
toStringResult = new ToStringResult(Boolean.toString((Boolean) message), null, Boolean.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gewoon direct returnen toch?
Object rawResult = Boolean.valueOf(message); | ||
return (T) rawResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Direct returnen.
Dit ga ik niet afmaken. Hebben we toen uitgebreid over gepraat. |
No description provided.