Qpid
  1. Qpid
  2. QPID-3019

Exception not reported properly when creating a Producer with an invalid destination

    Details

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

      Description

      When creating a message producer with an invalid destination an exception is not thrown.
      When the send method on the producer (created with an invalid destination) is invoked it results in exceptions.

      Exception in thread "main" java.lang.NullPointerException
      at org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage(BasicMessageProducer_0_10.java:166)
      at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:490)
      at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:445)
      at org.apache.qpid.client.BasicMessageProducer.send(BasicMessageProducer.java:283)
      at org.apache.qpid.example.Spout.<init>(Spout.java:98)
      at org.apache.qpid.example.Spout.main(Spout.java:146)

      Therefore it's important an exception to be thrown at the time of creating a producer (or consumer) when an invalid destination is supplied.
      (Note. the consumer creation code path does throw an exception as expected.)

        Activity

        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