< prev index next >

src/java.base/share/classes/java/lang/module/ModuleFinder.java

Print this page
rev 14279 : [mq]: 8140281-deprecation-optional.get

@@ -327,11 +327,11 @@
                     allModules = Stream.concat(first.findAll().stream(),
                                                second.findAll().stream())
                                        .map(a -> a.descriptor().name())
                                        .distinct()
                                        .map(this::find)
-                                       .map(Optional::get)
+                                       .map(Optional::getWhenPresent)
                                        .collect(Collectors.toSet());
                 }
                 return allModules;
             }
         };
< prev index next >