commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karsten Wutzke" <kwut...@web.de>
Subject Re: commons lang3: NullArgumentException missing?
Date Wed, 21 Dec 2011 21:41:57 GMT
Wow, the Java/JDK is getting dirtier and dirtier with every release. The code

 public Foo(Bar bar) {
     this.bar = Objects.requireNonNull(bar);
 }
looks really really awful to me.

IMO it's time to reimplement the JDK and throw away backward compatibility than introduce
patch after patch. At least a second clean API of the JDK should be provided.

I wonder what others are thinking about this.

Karsten


-----Urspr√ľngliche Nachricht-----
Von: "Paul Benedict" <pbenedict@apache.org>
Gesendet: 21.12.2011 19:04:48
An: "Commons Users List" <user@commons.apache.org>
Betreff: Re: commons lang3: NullArgumentException missing?

>The official standard in the JDK is to throw NPE for null arguments. Since
>JDK 7, they have made API available for this in
>java.util.Objects#requireNonNull(). Commons is following the official
>direction.
>On Dec 21, 2011 10:16 AM, <kwutzke@web.de> wrote:


___________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

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


Mime
View raw message