Skip to content

Commit

Permalink
Disable System.security reflection test
Browse files Browse the repository at this point in the history
...  from Java8andUp test_getDeclaredFieldLjava_lang_String

Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Dec 6, 2024
1 parent ff753fe commit 0ba0e18
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,17 @@ public void test_getDeclaredFieldLjava_lang_String() {
}
*/

try {
java.lang.reflect.Field f = System.class.getDeclaredField("security");
Assert.fail("java.lang.System.security shoud NOT be accessible via reflection");
} catch (NoSuchFieldException e) {
/**
* Disable temporarily for Java 24+ until the
* System.security field is removed
* https://github.com/eclipse-openj9/openj9/issues/20563
*/
if (VersionCheck.major() < 24) {
try {
java.lang.reflect.Field f = System.class.getDeclaredField("security");
Assert.fail("java.lang.System.security shoud NOT be accessible via reflection");
} catch (NoSuchFieldException e) {
}
}

try {
Expand Down

0 comments on commit 0ba0e18

Please sign in to comment.