Merge
authorlana
Thu, 07 Jan 2016 15:15:38 -0800
changeset 34902 e101f200cb31
parent 34898 5c5fa2771fa6 (current diff)
parent 34901 bba3b9d1c9ea (diff)
child 34903 0a5536ef0eec
Merge
--- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java	Thu Jan 07 09:34:05 2016 -0800
+++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java	Thu Jan 07 15:15:38 2016 -0800
@@ -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));
 
 }
--- a/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java	Thu Jan 07 09:34:05 2016 -0800
+++ b/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java	Thu Jan 07 15:15:38 2016 -0800
@@ -112,8 +112,7 @@
     /**
      * Holds a list of all methods.
      */
-    private final LinkedList<SingleDynamicMethod> methods;
-    private final ClassLoader classLoader;
+    private final LinkedList<SingleDynamicMethod> methods = new LinkedList<>();
 
     /**
      * Creates a new overloaded dynamic method.
@@ -122,13 +121,7 @@
      * @param name the name of the method
      */
     OverloadedDynamicMethod(final Class<?> clazz, final String name) {
-        this(new LinkedList<SingleDynamicMethod>(), clazz.getClassLoader(), getClassAndMethodName(clazz, name));
-    }
-
-    private OverloadedDynamicMethod(final LinkedList<SingleDynamicMethod> methods, final ClassLoader classLoader, final String name) {
-        super(name);
-        this.methods = methods;
-        this.classLoader = classLoader;
+        super(getClassAndMethodName(clazz, name));
     }
 
     @Override
@@ -288,10 +281,6 @@
         return b.toString();
     };
 
-    ClassLoader getClassLoader() {
-        return classLoader;
-    }
-
     private static boolean isApplicableDynamically(final LinkerServices linkerServices, final MethodType callSiteType,
             final SingleDynamicMethod m) {
         final MethodType methodType = m.getMethodType();
--- a/nashorn/test/script/basic/JDK-8134488.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/nashorn/test/script/basic/JDK-8134488.js	Thu Jan 07 15:15:38 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * 
  * This code is free software; you can redistribute it and/or modify it
--- a/nashorn/test/script/basic/JDK-8134490.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/nashorn/test/script/basic/JDK-8134490.js	Thu Jan 07 15:15:38 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * 
  * This code is free software; you can redistribute it and/or modify it
--- a/nashorn/test/script/basic/JDK-8134939.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/nashorn/test/script/basic/JDK-8134939.js	Thu Jan 07 15:15:38 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * 
  * This code is free software; you can redistribute it and/or modify it