[
https://issues.apache.org/jira/browse/LANG-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved LANG-1525.
-----------------------------------
Fix Version/s: 3.10
Resolution: Fixed
> Internally use Validate.notNull(foo, ...) instead of Validate.isTrue(foo !=
> null, ...)
> --------------------------------------------------------------------------------------
>
> Key: LANG-1525
> URL: https://issues.apache.org/jira/browse/LANG-1525
> Project: Commons Lang
> Issue Type: Improvement
> Reporter: Gary D. Gregory
> Priority: Major
> Fix For: 3.10
>
>
> We currently perform checks like:
> {code:java}
> Validate.isTrue(foo != null, ...)
> {code}
> Which should be IMO:
> {code:java}
> Validate.notNull(foo, ...);
> {code}
> The difference being that the former throws IAE and the later NPE.
>
> As with [collections], my argument is the same, the JRE uses
> Objects.requireNonNull() to throw an NPE, so I'd like to keep normalizing on
> that.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)