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 2022/12/12 21:40:37 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a diff in pull request #4302: ARTEMIS-4106 do not set prop w/empty key when converting to OpenWire

clebertsuconic commented on code in PR #4302:
URL: https://github.com/apache/activemq-artemis/pull/4302#discussion_r1046416900


##########
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java:
##########
@@ -927,6 +932,10 @@ private static void setAMQMsgObjectProperties(final ActiveMQMessage amqMsg,
                                                  final Set<SimpleString> props) throws IOException {
       for (SimpleString s : props) {
          final String keyStr = s.toString();
+         if (keyStr.length() == 0) {

Review Comment:
   shouldn't it check for keyStr.trim().isEmpty() instead?
   
   
   If I add a property named "   " it will still go through and be converted.
   
   
   as a matter of fact the test could add such condition?



-- 
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: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org