Hello,

While playing around with the JMS API, we noticed that if an empty string is 
passed to the JmsConnectionFactory constructor, it will throw back a 
NullPointerException because it tries to access the ".toString" of a NULL URL 
(See createURI).


Do you agree that it would be better to throw an exception which clearly says 
an empty String URL is forbidden? If yes, I will add a jira issue for it.


public static void main(String[] args) {
    new JmsConnectionFactory("");
}


Output

------------

Exception in thread "main" java.lang.NullPointerException
at 
org.apache.qpid.jms.JmsConnectionFactory.<init>(JmsConnectionFactory.java:115)
at 
org.apache.qpid.jms.JmsConnectionFactory.<init>(JmsConnectionFactory.java:111)


Regards,

Adel

Reply via email to