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/05 16:01:12 UTC

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

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


##########
artemis-protocols/artemis-openwire-protocol/src/test/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverterTest.java:
##########
@@ -248,6 +248,7 @@ public void testBadPropertyConversion() throws Exception {
       coreMessage.putStringProperty(hdrBrokerInTime, "5678");
       coreMessage.putStringProperty(hdrCommandId, "foo");
       coreMessage.putStringProperty(hdrDroppable, "true");
+      coreMessage.putStringProperty("", "");

Review Comment:
   @brusdev, my concern is breaking anybody who is actually using this "functionality."
   
   @gemmellr, it's not obvious from the test, but if there's a property with an empty name it will trigger a `java.lang.IllegalArgumentException` in accordance with the [JMS spec](https://docs.oracle.com/javaee/7/api/javax/jms/Message.html#setObjectProperty-java.lang.String-java.lang.Object-). Therefore, if the test completes then by definition no exception was thrown during conversion.



-- 
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