Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.8
-
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.)