commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@scalaris.com>
Subject Re: commons lang3: NullArgumentException missing?
Date Wed, 21 Dec 2011 17:17:43 GMT
Hi Karsten,

kwutzke@web.de wrote:

> Hello,
> 
> I can see NullArgumentException has been removed from the lang3 API, but I
> don't understand why. There have been long discussions in the past why a
> NullArgumentException is better than using an IllegalArgumentException.
> Most people are using commons-lang anyway, so what's the point of removing
> NullArgumentException?
> 
> What if developers don't want to use IllegalArgumentException? Is is more
> advantageous to have these people provide their own NullArgumentException
> implementations? This is stupid. One of these reasons why the commons-*
> libs have been created was to fill the gap where the Java API has provided
> nothing. Now lang3 is there, too.
> 
> If people aren't interested in using NullArgumentException as provided,
> why don't they simply ignore it or provide their own implementations? I
> don't understand it.
> 
> Any comments/explanations to clear this up are welcome.

We decided to follow the JDK and throw in our sources a NullPointerException 
instead. We removed it to avoid any expectation that NullArgumentException 
is still in use like before.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message