commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thiago Andrade <thia...@gmail.com>
Subject [lang]
Date Tue, 06 May 2014 12:53:15 GMT
Hello people,

Analizing the JIRA issue https://issues.apache.org/jira/browse/LANG-1008 the
contributors noticed that NumberUtils.max/min methods all have the same
problem:
They all throw an IllegalArgumentException when according to the official
documentation (Oracle|Sun) says that a NullPointerException must be thrown
when an argument must not be null.

However according to Apache Commons Lang Developer Guide, these methods are
all correct. This guide says that "When throwing an exception to indicate a
bad argument, always try to throw IllegalArgumentException, even if the
argument was null. Do not throw NullPointerException.".

This mail was sent in order to discuss around and make decisions to solve
this dilemma where the Java official specification says X and the Apache
official specification says Y.

My sincere thanks for your time and consideration,

-- 
Thiago Andrade

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