You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/01/28 14:36:37 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a change in pull request #2954: ARTEMIS-2608 Fix ClassCastException on binary properties retrieval

clebertsuconic commented on a change in pull request #2954: ARTEMIS-2608 Fix ClassCastException on binary properties retrieval
URL: https://github.com/apache/activemq-artemis/pull/2954#discussion_r371839493
 
 

 ##########
 File path: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
 ##########
 @@ -610,7 +613,7 @@ private static ActiveMQMessage toAMQMessage(MessageReference reference,
          amqMsg.setCorrelationId(corrId.toString());
       }
 
-      final byte[] dsBytes = (byte[]) coreMessage.getObjectProperty(AMQ_MSG_DATASTRUCTURE);
+      final byte[] dsBytes = getBytesPropertyOrNull(coreMessage, AMQ_MSG_DATASTRUCTURE);
 
 Review comment:
   This would been either a mistake from the user, or someone maliciously trying to break things. 
   
   shouldn't you log such condition instead of silently failing?
   
   or perhaps I would prefer rejecting the message and sending an error to the client, meaning the previous semantic was probably ok?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services