Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-776

proton-j: Message.decode doesn't validate all data types?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • proton-0.8
    • proton-j-future
    • proton-j

    Description

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            dnwe Dominic Evans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: