FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Is the example in API Note for map method on Optional class correct?
https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html#map-java.util.function.Function-
Optional<FileInputStream> fis =
names.stream().filter(name -> !isProcessedYet(name))
.findFirst()
.map(name -> new FileInputStream(name));
new FileInputStream(name) in the map function throws java.io.FileNotFoundException (checked exception)
REPRODUCIBILITY :
This bug can be reproduced always.