JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier<String>)
Paul Benedict
pbenedict at apache.org
Tue Apr 9 23:10:46 UTC 2013
If obj is null and the supplier is also null, you will not get an NPE with
the expected message. Since it's kind of odd to get an NPE constructing an
NPE, I think:
@throws NullPointerException if {@code obj} is {@code null}
should be changed to:
@throws NullPointerException if {@code obj} or {@code supplier} are {@code
null}
More information about the core-libs-dev
mailing list