Use valueOf().
This commit is contained in:
parent
b4a43380f1
commit
d02b2c53a0
|
@ -539,7 +539,7 @@ public class SystemUtilsTest {
|
||||||
final String expectedStringValue = System.getProperty("java.awt.headless");
|
final String expectedStringValue = System.getProperty("java.awt.headless");
|
||||||
final String expectedStringValueWithDefault = System.getProperty("java.awt.headless", "false");
|
final String expectedStringValueWithDefault = System.getProperty("java.awt.headless", "false");
|
||||||
assertNotNull(expectedStringValueWithDefault);
|
assertNotNull(expectedStringValueWithDefault);
|
||||||
final boolean expectedValue = Boolean.valueOf(expectedStringValue).booleanValue();
|
final boolean expectedValue = Boolean.parseBoolean(expectedStringValue);
|
||||||
if (expectedStringValue != null) {
|
if (expectedStringValue != null) {
|
||||||
assertEquals(expectedStringValue, SystemUtils.JAVA_AWT_HEADLESS);
|
assertEquals(expectedStringValue, SystemUtils.JAVA_AWT_HEADLESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue