aboutsummaryrefslogtreecommitdiff
path: root/src/jdk/internal/dynalink/support/Lookup.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jdk/internal/dynalink/support/Lookup.java')
-rw-r--r--src/jdk/internal/dynalink/support/Lookup.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/jdk/internal/dynalink/support/Lookup.java b/src/jdk/internal/dynalink/support/Lookup.java
index 4b21e1c4..ba4ff77c 100644
--- a/src/jdk/internal/dynalink/support/Lookup.java
+++ b/src/jdk/internal/dynalink/support/Lookup.java
@@ -89,7 +89,6 @@ import java.lang.invoke.MethodType;
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 @@ public class Lookup {
}
/**
- * 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 class Lookup {
*/
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(