Hello Tim,

I took a look on the master brunch of the github repo and indeed it seems to be 
fixed.


Regards,

Adel


________________________________
From: Timothy Bish <tabish...@gmail.com>
Sent: Friday, January 13, 2017 3:30:59 PM
To: users@qpid.apache.org
Subject: Re: [Qpid JMS 0.11.1] Nullpointer exception when providing an empty 
string to the ConnectionFactory

On 01/13/2017 08:41 AM, Adel Boutros wrote:
> 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
>

I will take a look at the code again, some things were fixed recently in
QPIDJMS-245 but there's probably a few more defensive checks needed to
keep people from hitting this.


--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to