From 0ba0e182887a2a43839d3c8c6a35440510a62fc4 Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Fri, 6 Dec 2024 15:14:11 -0500 Subject: [PATCH] Disable System.security reflection test ... from Java8andUp test_getDeclaredFieldLjava_lang_String Signed-off-by: Theresa Mammarella --- .../org/openj9/test/java/lang/Test_Class.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/functional/Java8andUp/src_110_up/org/openj9/test/java/lang/Test_Class.java b/test/functional/Java8andUp/src_110_up/org/openj9/test/java/lang/Test_Class.java index 47220a4f952..ea6566b156f 100644 --- a/test/functional/Java8andUp/src_110_up/org/openj9/test/java/lang/Test_Class.java +++ b/test/functional/Java8andUp/src_110_up/org/openj9/test/java/lang/Test_Class.java @@ -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 {