--- openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java.orig +++ openjdk-boot/jdk/src/share/classes/sun/security/util/Optional.java @@ -189,12 +189,7 @@ * @throws NullPointerException if the mapping function is null */ public Optional map(Function mapper) { - Objects.requireNonNull(mapper); - if (!isPresent()) - return empty(); - else { - return Optional.ofNullable(mapper.apply(value)); - } + return empty(); } /**