fix string comparison
This commit is contained in:
parent
6fbc0ccd78
commit
e62e713393
|
@ -5,7 +5,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import com.baeldung.jvmbitversion.JVMBitVersion;
|
|
||||||
import com.sun.jna.Platform;
|
import com.sun.jna.Platform;
|
||||||
|
|
||||||
public class JVMBitVersionUnitTest {
|
public class JVMBitVersionUnitTest {
|
||||||
|
@ -19,9 +18,9 @@ public class JVMBitVersionUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenUsingSystemClass_thenOutputIsAsExpected() {
|
public void whenUsingSystemClass_thenOutputIsAsExpected() {
|
||||||
if (System.getProperty("sun.arch.data.model") == "64") {
|
if ("64".equals(System.getProperty("sun.arch.data.model"))) {
|
||||||
assertEquals("64-bit", jvmVersion.getUsingSystemClass());
|
assertEquals("64-bit", jvmVersion.getUsingSystemClass());
|
||||||
} else if (System.getProperty("sun.arch.data.model") == "32") {
|
} else if ("32".equals(System.getProperty("sun.arch.data.model"))) {
|
||||||
assertEquals("32-bit", jvmVersion.getUsingSystemClass());
|
assertEquals("32-bit", jvmVersion.getUsingSystemClass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue