[ 
https://issues.apache.org/jira/browse/QPID-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008767#comment-13008767
 ] 

Andrew Kennedy commented on QPID-2930:
--------------------------------------

While I approve of adding tests, in this case the only assertion is that a sent 
message (with no properties set) is received, so this issue is never tested. I 
think the test case should set some properties, of varying allowed and 
non-allowed types, and then assert that the returned message still provides an 
enumeration with a list of those, and only those, properties.

Since x-amqp-0-10.routing-key is internal, maybe it should be filtered out, 
along with all other x-amqp-* and x-qpid-* properties?

>  JMS msg.getPropertyNames() method should not return x-amqp-0-10.routing-key
> ----------------------------------------------------------------------------
>
>                 Key: QPID-2930
>                 URL: https://issues.apache.org/jira/browse/QPID-2930
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Rajith Attapattu
>            Assignee: Rajith Attapattu
>            Priority: Minor
>             Fix For: 0.10
>
>
> Description of problem:
> JMS msg.getPropertyNames() method should not return x-amqp-0-10.routing-key,
> x-amqp-0-10.routing-key is internal property. It cause exception if loop via
> ProertyName enumeration. 
> Code: 
> === 
> Enumeration<String> enu = msg.getPropertyNames(); 
> while (enu.hasMoreElements()) { 
> String name = (String) enu.nextElement(); 
> String value = msg.getStringProperty(name); 
> } 
> Exception
> =========
> Caused by: javax.jms.MessageFormatException:
> getString("x-amqp-0-10.routing-key") failed as value of type class [B is an 
> array. 
> at
> org.apache.qpid.client.message.AMQMessageDelegate_0_10.getStringProperty(AMQMessageDelegate_0_10.java:639)
>  
> at
> org.apache.qpid.client.message.AbstractJMSMessage.getStringProperty(AbstractJMSMessage.java:254)
>  

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to