From b90417ab15e9f4683656b488ecc7f9b94094b247 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Wed, 1 Oct 2025 21:52:43 +0100 Subject: [PATCH] Flip equals test in TestSecurityProperties.java to handle null values from Security.getProperty Related: RHEL-126022 --- TestSecurityProperties.java | 3 ++- java-25-openjdk.spec | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TestSecurityProperties.java b/TestSecurityProperties.java index 2967a32..2507ceb 100644 --- a/TestSecurityProperties.java +++ b/TestSecurityProperties.java @@ -46,9 +46,10 @@ public class TestSecurityProperties { } for (Object key: jdkProps.keySet()) { String sKey = (String)key; + System.out.println(MSG_PREFIX + "Checking " + sKey); String securityVal = Security.getProperty(sKey); String jdkSecVal = jdkProps.getProperty(sKey); - if (!securityVal.equals(jdkSecVal)) { + if (!jdkSecVal.equals(securityVal)) { String msg = "Expected value '" + jdkSecVal + "' for key '" + sKey + "'" + " but got value '" + securityVal + "'"; throw new RuntimeException("Test failed! " + msg); diff --git a/java-25-openjdk.spec b/java-25-openjdk.spec index 4322877..8ceb2d8 100644 --- a/java-25-openjdk.spec +++ b/java-25-openjdk.spec @@ -2483,5 +2483,6 @@ exit 0 - Adjust TestTranslations.java to expect the same short name throughout for fr_FR and de_DE (bug?) - Remove references to libsystemconf.so and nss.fips.cfg from the 21u FIPS patch - Include static libraries in the vm_variant subdirectory after JDK-8307858 (libjvm.a) +- Flip equals test in TestSecurityProperties.java to handle null values from Security.getProperty - Sync the copy of the portable specfile with the latest update - Related: RHEL-126022