commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [lang] RuntimeException types
Date Thu, 30 Jan 2014 16:51:47 GMT
Aside from that, the method continues the tradition of this class not
cleaning up after itself.

Please see my other email thread related to
https://issues.apache.org/jira/browse/LANG-959.

Gary


On Thu, Jan 30, 2014 at 11:37 AM, Matt Benson <gudnabrsam@gmail.com> wrote:

> How do we feel about changing the type of a thrown RTE?  Specifically, we
> have agreed to standardize on the idea that Validate.notNull() throws
> NullPointerException, but the recently added
> FieldUtils#removeFinalModifier() method validates the incoming field
> parameter with Validate.isTrue(field != null), throwing
> IllegalArgumentException.  I prefer the simplicity of Validate.notNull()
> but changing this now would mean that consumers of the method who are
> conceivably now catching IllegalArgumentException would now fail to catch
> the thrown NPE.
>
> Thoughts?
>
> Matt
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message