JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier) (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Wed Apr 10 12:01:34 UTC 2013
- Previous message: JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier)
- Next message: JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 09/04/2013 22:12, Joe Darcy wrote:
Hello,
Please review my changes for 8011800: Add java.util.Objects.requireNonNull(T, Supplier) http://cr.openjdk.java.net/~darcy/8011800.0/ which add a new method to java.util.Objects to take a Supplier rather than a String. Patch inline below. Thanks, -Joe A typo in the javadoc "this methods allows" -> "this method allows".
A subjective comment, but I would drop the word "sibling" from the statement.
A minor nit with the @param spilling over into a second line is that it might be clearer to indent it so that it's clear where the next tag starts. I see the existing requiresNonNull are inconsistent on this point.
The uninteresting Supplier is null case isn't specified, perhaps this is deliberate?
A typo in the test at line 208, "rvariant" -> "variant".
Also the printed message at line 226 when you get don't pantaloons should say "Supplier" rather than "2-arg".
-Alan.
- Previous message: JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier)
- Next message: JDK 8 code review request for 8011800: Add java.util.Objects.requireNonNull(T, Supplier)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]