changeset 1589:33e33bbc3bdb

Merge
author lana
date Thu, 07 Jan 2016 15:15:38 -0800
parents b5dcf2b2e01a 9f96a4b227f3
children 1916a2c680d8
files
diffstat 5 files changed, 6 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java	Thu Jan 07 09:34:05 2016 -0800
+++ b/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/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java	Thu Jan 07 09:34:05 2016 -0800
+++ b/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/test/script/basic/JDK-8134488.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/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/test/script/basic/JDK-8134490.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/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/test/script/basic/JDK-8134939.js	Thu Jan 07 09:34:05 2016 -0800
+++ b/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