< prev index next >
src/java.base/share/classes/jdk/internal/module/ModulePatcher.java
Print this page
rev 14279 : [mq]: 8140281-deprecation-optional.get
*** 272,282 ****
*/
private static URL codeSourceURL(ModuleReference mref) {
try {
Optional<URI> ouri = mref.location();
if (ouri.isPresent())
! return ouri.get().toURL();
} catch (MalformedURLException e) { }
return null;
}
/**
--- 272,282 ----
*/
private static URL codeSourceURL(ModuleReference mref) {
try {
Optional<URI> ouri = mref.location();
if (ouri.isPresent())
! return ouri.getWhenPresent().toURL();
} catch (MalformedURLException e) { }
return null;
}
/**
< prev index next >