--- old/src/share/classes/java/util/Optional.java 2013-09-27 15:47:59.081217017 -0700 +++ new/src/share/classes/java/util/Optional.java 2013-09-27 15:47:58.921217009 -0700 @@ -85,6 +85,7 @@ * Constructs an instance with the value present. * * @param value the non-null value to be present + * @throws NullPointerException if value is null */ private Optional(T value) { this.value = Objects.requireNonNull(value); @@ -96,6 +97,7 @@ * @param the class of the value * @param value the value to be present, which must be non-null * @return an {@code Optional} with the value present + * @throws NullPointerException if value is null */ public static Optional of(T value) { return new Optional<>(value);