Dominic Evans created PROTON-776:
------------------------------------

             Summary: proton-j: Message.decode doesn't validate all data types?
                 Key: PROTON-776
                 URL: https://issues.apache.org/jira/browse/PROTON-776
             Project: Qpid Proton
          Issue Type: Bug
          Components: proton-j
    Affects Versions: 0.8
            Reporter: Dominic Evans


PROTON-616 attempted to enfore that message annotation keys were of the Symbol 
type. However, it seems to be possible to send a map with strings keys for the 
message annotations section (e.g., via the ruby client) and message.decode will 
accept this.

It is only when you try to use the MessageAnnotations map that you get a 
`java.lang.ClassCastException: java.lang.String incompatible with 
org.apache.qpid.proton.amqp.Symbol` exception because the underlying map isn't 
compatible with what the generics suggest.

Isn't this something that we should catch at decode time?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to