Skip to content

Commit 33ae152

Browse files
[GR-40794] Avoid access checks for Proxy classes using synchronization in VM operations.
PullRequest: graal/12615
2 parents eadce78 + fdccee8 commit 33ae152

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/proxy/ProxySubstitutions.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
import java.lang.reflect.Constructor;
2828
import java.lang.reflect.InvocationHandler;
29-
import java.lang.reflect.Modifier;
3029
import java.lang.reflect.Proxy;
3130

3231
import org.graalvm.nativeimage.ImageSingletons;
@@ -48,9 +47,7 @@ private static Constructor<?> getProxyConstructor(Class<?> caller, ClassLoader l
4847
final Class<?> cl = ImageSingletons.lookup(DynamicProxyRegistry.class).getProxyClass(loader, interfaces);
4948
try {
5049
final Constructor<?> cons = cl.getConstructor(InvocationHandler.class);
51-
if (!Modifier.isPublic(cl.getModifiers())) {
52-
cons.setAccessible(true);
53-
}
50+
cons.setAccessible(true);
5451
return cons;
5552
} catch (NoSuchMethodException e) {
5653
throw new InternalError(e.toString(), e);

0 commit comments

Comments
 (0)