< prev index next >
src/java.base/share/classes/jdk/internal/loader/BootLoader.java
Print this page
rev 14279 : [mq]: 8140281-deprecation-optional.get
*** 237,247 ****
if (mn != null) {
// named module from runtime image or exploded module
Optional<Module> om = Layer.boot().findModule(mn);
if (!om.isPresent())
throw new InternalError(mn + " not in boot layer");
! return om.get();
}
return null;
}
--- 237,247 ----
if (mn != null) {
// named module from runtime image or exploded module
Optional<Module> om = Layer.boot().findModule(mn);
if (!om.isPresent())
throw new InternalError(mn + " not in boot layer");
! return om.getWhenPresent();
}
return null;
}
< prev index next >