< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java

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

@@ -475,11 +475,11 @@
         // check if any module specified in -requires is missing
         Optional<String> req = options.requires.stream()
                 .filter(mn -> !modules.containsKey(mn))
                 .findFirst();
         if (req.isPresent()) {
-            throw new BadArgs("err.module.not.found", req.get());
+            throw new BadArgs("err.module.not.found", req.getWhenPresent());
         }
 
         // classpath
         for (Path p : getClassPaths(options.classpath)) {
             if (Files.exists(p)) {
< prev index next >