Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
index 96b87ce00..f718ea1fe 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/FilterImpl.java
@@ -14,10 +14,8 @@
package org.eclipse.osgi.internal.framework;
-import static java.lang.invoke.MethodHandles.publicLookup;
import static java.util.Objects.requireNonNull;
-import java.lang.invoke.MethodHandle;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
@@ -787,8 +785,7 @@ public abstract class FilterImpl implements Filter {
if (Modifier.isStatic(method.getModifiers()) && target.isAssignableFrom(method.getReturnType())) {
setAccessible(method);
try {
- MethodHandle mh = publicLookup().unreflect(method);
- return mh.invoke(value2.trim());
+ return method.invoke(null, value2.trim());
} catch (Error e) {
throw e;
} catch (Throwable e) {
@@ -806,8 +803,7 @@ public abstract class FilterImpl implements Filter {
}
setAccessible(constructor);
try {
- MethodHandle mh = publicLookup().unreflectConstructor(constructor);
- return mh.invoke(value2.trim());
+ return constructor.newInstance(value2.trim());
} catch (Error e) {
throw e;
} catch (Throwable e) {

Back to the top