Simpler NPE message for new method.
This commit is contained in:
parent
0f119ef2a6
commit
94b3784fde
|
@ -475,7 +475,7 @@ public final class Range<T> implements Serializable {
|
|||
*/
|
||||
public T fit(final T element) {
|
||||
// Comparable API says throw NPE on null
|
||||
Validate.notNull(element, "Element is null");
|
||||
Validate.notNull(element, "element");
|
||||
if (isAfter(element)) {
|
||||
return minimum;
|
||||
} else if (isBefore(element)) {
|
||||
|
|
Loading…
Reference in New Issue