--- a/nashorn/src/jdk/internal/dynalink/support/Lookup.java Thu Aug 01 12:23:38 2013 +0200
+++ b/nashorn/src/jdk/internal/dynalink/support/Lookup.java Wed Aug 07 16:38:44 2013 +0200
@@ -89,7 +89,6 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
/**
* A wrapper around MethodHandles.Lookup that masks checked exceptions in those cases when you're looking up methods
@@ -235,9 +234,8 @@
}
/**
- * Performs a findSpecial on the underlying lookup, except for the backport where it rather uses unreflect. Converts
- * any encountered {@link IllegalAccessException} into an {@link IllegalAccessError} and a
- * {@link NoSuchMethodException} into a {@link NoSuchMethodError}.
+ * Performs a findSpecial on the underlying lookup. Converts any encountered {@link IllegalAccessException} into an
+ * {@link IllegalAccessError} and a {@link NoSuchMethodException} into a {@link NoSuchMethodError}.
*
* @param declaringClass class declaring the method
* @param name the name of the method
@@ -248,13 +246,6 @@
*/
public MethodHandle findSpecial(Class<?> declaringClass, String name, MethodType type) {
try {
- if(Backport.inUse) {
- final Method m = declaringClass.getDeclaredMethod(name, type.parameterArray());
- if(!Modifier.isPublic(declaringClass.getModifiers()) || !Modifier.isPublic(m.getModifiers())) {
- m.setAccessible(true);
- }
- return unreflect(m);
- }
return lookup.findSpecial(declaringClass, name, type, declaringClass);
} catch(IllegalAccessException e) {
final IllegalAccessError ee = new IllegalAccessError("Failed to access special method " + methodDescription(