Skip to content

Commit 8828007

Browse files
committed
Do not attempt to set null system properties
1 parent cdba069 commit 8828007

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test-framework/common/src/main/java/io/quarkus/test/common/RestorableSystemProperties.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public static RestorableSystemProperties setProperties(Map<String, String> props
2020
sysPropRestore.put(i.getKey(), System.getProperty(i.getKey()));
2121
}
2222
for (Map.Entry<String, String> i : props.entrySet()) {
23-
System.setProperty(i.getKey(), i.getValue());
23+
if (i.getKey() != null && i.getValue() != null) {
24+
System.setProperty(i.getKey(), i.getValue());
25+
}
2426
}
2527
return new RestorableSystemProperties(sysPropRestore);
2628
}

0 commit comments

Comments
 (0)