jbertram commented on code in PR #4426:
URL: https://github.com/apache/activemq-artemis/pull/4426#discussion_r1158596356


##########
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java:
##########
@@ -111,9 +111,13 @@ public static org.apache.activemq.artemis.api.core.Message 
inbound(final Message
       final ActiveMQBuffer body = coreMessage.getBodyBuffer();
 
       final ByteSequence contents = messageSend.getContent();
-      if (contents == null && coreType == 
org.apache.activemq.artemis.api.core.Message.TEXT_TYPE) {
-         body.writeNullableString(null);
-      } else if (contents != null) {
+      if (contents == null) {
+         if (coreType == 
org.apache.activemq.artemis.api.core.Message.TEXT_TYPE) {
+            body.writeNullableString(null);
+         } else if (coreType == 
org.apache.activemq.artemis.api.core.Message.MAP_TYPE) {
+            body.writeByte(DataConstants.NULL);
+         }

Review Comment:
   Not all of the tests cover this specific issue. Most of them, in fact, cover 
other uses cases involving the same JMS code with different protocols (i.e. 
core and AMQP). However, I felt it was worth confirming those work as expected.
   
   That said, both `testMapMessageConversionBetweenOpenWireAndAMQP` and 
`testMapMessageConversionBetweenOpenWireAndCore` fail without the fix.
   
   I'll add a unit test for good measure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to