8146556: jdk.dynalink.beans.ClassLinker can avoid using specific lookup and can use publicLookup instead
Reviewed-by: jlaskey
--- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java Tue Jan 05 18:40:43 2016 +0530
+++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java Wed Jan 06 20:19:02 2016 +0530
@@ -102,7 +102,7 @@
setPropertyGetter("static", FOR_CLASS, ValidationType.EXACT_CLASS);
}
- private static final MethodHandle FOR_CLASS = new Lookup(MethodHandles.lookup()).findStatic(StaticClass.class,
+ private static final MethodHandle FOR_CLASS = Lookup.PUBLIC.findStatic(StaticClass.class,
"forClass", MethodType.methodType(StaticClass.class, Class.class));
}