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

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: proton-0.8
    • Fix Version/s: proton-j-future
    • Component/s: proton-j
    • Labels:

      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

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

              Dates

              • Created:
                Updated: