Skip to content

Commit

Permalink
Add java.lang.Access.allowSecurityManager to jdk21
Browse files Browse the repository at this point in the history
Issue eclipse-openj9#20748

Signed-off-by: Peter Shipton <[email protected]>
  • Loading branch information
pshipton committed Dec 4, 2024
1 parent 4f06ea8 commit bcff7cc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ public Module addEnableNativeAccess(Module mod) {
return mod.implAddEnableNativeAccess();
}

/*[IF (JAVA_SPEC_VERSION >= 21) & (JAVA_SPEC_VERSION < 24)]*/
@Override
public boolean allowSecurityManager() {
return System.allowSecurityManager();
}
/*[ENDIF] (JAVA_SPEC_VERSION >= 21) & (JAVA_SPEC_VERSION < 24) */

/*[IF JAVA_SPEC_VERSION >= 23]*/
@Override
public boolean addEnableNativeAccess(ModuleLayer moduleLayer, String moduleName) {
Expand All @@ -559,11 +566,6 @@ public void putCharUTF16(byte[] val, int index, int c) {
}

/*[IF JAVA_SPEC_VERSION < 24]*/
@Override
public boolean allowSecurityManager() {
return System.allowSecurityManager();
}

@Override
public long stringConcatHelperPrepend(long indexCoder, byte[] buf, String value) {
return StringConcatHelper.prepend(indexCoder, buf, value);
Expand Down

0 comments on commit bcff7cc

Please sign in to comment.