Disable FieldAccess Checks in the reflection library
This commit is contained in:
parent
e2f8f1aded
commit
98c3bff8ce
@ -287,11 +287,8 @@ public class AccessibleObject implements AnnotatedElement {
|
||||
if (caller == null) {
|
||||
// No caller frame when a native thread attaches to the VM
|
||||
// only allow access to a public accessible member
|
||||
boolean canAccess = Reflection.verifyPublicMemberAccess(declaringClass, declaringClass.getModifiers());
|
||||
if (!canAccess && throwExceptionIfDenied) {
|
||||
throwInaccessibleObjectException(caller, declaringClass);
|
||||
}
|
||||
return canAccess;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Module callerModule = caller.getModule();
|
||||
@ -325,10 +322,7 @@ public class AccessibleObject implements AnnotatedElement {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (throwExceptionIfDenied) {
|
||||
throwInaccessibleObjectException(caller, declaringClass);
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private void throwInaccessibleObjectException(Class<?> caller, Class<?> declaringClass) {
|
||||
|
Loading…
Reference in New Issue
Block a user