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

Related: RHEL-126022
This commit is contained in:
Andrew Hughes 2025-10-01 21:52:43 +01:00
parent 6636ae8b18
commit b90417ab15
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

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