# HG changeset patch # User lana # Date 1452208538 28800 # Node ID e101f200cb31f69228be265467bd410e0857ba68 # Parent 5c5fa2771fa621a928548ef8bcc8d360ec8a55cd# Parent bba3b9d1c9ea3c0e6b98a38fd89bec7b232d06a7 Merge diff -r 5c5fa2771fa6 -r e101f200cb31 nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/ClassLinker.java --- 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)); } diff -r 5c5fa2771fa6 -r e101f200cb31 nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/OverloadedDynamicMethod.java --- 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 methods; - private final ClassLoader classLoader; + private final LinkedList 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(), clazz.getClassLoader(), getClassAndMethodName(clazz, name)); - } - - private OverloadedDynamicMethod(final LinkedList 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(); diff -r 5c5fa2771fa6 -r e101f200cb31 nashorn/test/script/basic/JDK-8134488.js --- 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 diff -r 5c5fa2771fa6 -r e101f200cb31 nashorn/test/script/basic/JDK-8134490.js --- 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 diff -r 5c5fa2771fa6 -r e101f200cb31 nashorn/test/script/basic/JDK-8134939.js --- 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