Qpid
  1. Qpid
  2. QPID-2723

NullPointerException thrown when you pass an address based destination to the setJMSReplyTo() in a Message.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: Java Client
    • Labels:
      None

      Description

      When you pass a destination which was not used in consumer / producer (even when the address was the same, only the object was different), a NullPointerException is thrown, because the getExchangeName and getRoutingKey methods from AMQDestination returns null. This is due to a address not being evaluated properly and the details not being extracted.

      1. QPID-2723.patch
        7 kB
        Rajith Attapattu

        Activity

        Hide
        Rajith Attapattu added a comment -

        This contains a patch that fixes the issue mentioned here.

        However the fix needs the session reference to be valid in order to perform the lookups.
        However the code in AMQMessageDelegate_0_10 and AMQMessageDelegate_0_8 relies on the session being null to figure out if the ack mode is CLIENT_ACK in the acknowledge method.
        I am not sure if this is a correct assumption to make as somebody could easily violate this.

        Therefore I changed the code to check the ack mode explicitly.
        I am also setting a valid session reference to every message irrespective of the ack mode.

        Show
        Rajith Attapattu added a comment - This contains a patch that fixes the issue mentioned here. However the fix needs the session reference to be valid in order to perform the lookups. However the code in AMQMessageDelegate_0_10 and AMQMessageDelegate_0_8 relies on the session being null to figure out if the ack mode is CLIENT_ACK in the acknowledge method. I am not sure if this is a correct assumption to make as somebody could easily violate this. Therefore I changed the code to check the ack mode explicitly. I am also setting a valid session reference to every message irrespective of the ack mode.
        Hide
        Rajith Attapattu added a comment -

        Fixed along with a test case.

        Show
        Rajith Attapattu added a comment - Fixed along with a test case.

          People

          • Assignee:
            Rajith Attapattu
            Reporter:
            Rajith Attapattu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development