Gary D. Gregory created LANG-1525:
-------------------------------------
Summary: 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
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)