From 41404b1fc52b4a2d6f6e1762d03711d627bbcc71 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-100678 --- 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..9fbaa45 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 9796113..1cc7cb4 100644 --- a/java-25-openjdk.spec +++ b/java-25-openjdk.spec @@ -2480,6 +2480,7 @@ exit 0 - Sync the copy of the portable specfile with the latest update - 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 - Related: RHEL-100678 * Mon Aug 25 2025 Andrew Hughes - 1:21.0.8.0.9-1