Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-5569

NullPointerException if message prop's userId is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.18
    • 0.27
    • JMS AMQP 0-x
    • None

    Description

      Some JMS applications will try to retrieve the userID from a message, and the qpid client may throw a NullPointerException if that is not set on the message. Ideally it should just return null if there is no userId set. Specifically in org.apache.qpid.client.message.AMQMessageDelegate_0_10.java, the method getStringProperty(String) checks if the propertyName equals JMSXUserID and if so returns a new String(_messageProps.getUserId()). Therefore if there is no userId set it can attempt String(null) which causes a NullPointerException.

      Also note that other properties in this method are specifically checking for null to avoid an exception like this.

      Attachments

        Activity

          People

            rgodfrey Robert Godfrey
            ndjensen Nathan Jensen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: