Flip equals test in TestSecurityProperties.java to handle null values from Security.getProperty

Related: RHEL-100678
This commit is contained in:
Andrew Hughes 2025-10-01 21:52:43 +01:00
parent 1e7fd9cde2
commit 41404b1fc5
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -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 <gnu.andrew@redhat.com> - 1:21.0.8.0.9-1