< prev index next >
src/jdk/nashorn/internal/objects/Global.java
Print this page
@@ -1003,13 +1003,11 @@
* Script access to "current" Global instance
*
* @return the global singleton
*/
public static Global instance() {
- final Global global = Context.getGlobal();
- Objects.requireNonNull(global);
- return global;
+ return Objects.requireNonNull(Context.getGlobal());
}
private static Global instanceFrom(final Object self) {
return self instanceof Global? (Global)self : instance();
}
< prev index next >