< prev index next >

src/java.base/share/classes/jdk/internal/module/ModulePatcher.java

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

@@ -272,11 +272,11 @@
          */
         private static URL codeSourceURL(ModuleReference mref) {
             try {
                 Optional<URI> ouri = mref.location();
                 if (ouri.isPresent())
-                    return ouri.get().toURL();
+                    return ouri.getWhenPresent().toURL();
             } catch (MalformedURLException e) { }
             return null;
         }
 
         /**
< prev index next >