diff --git a/core/src/main/java/info/openrocket/core/arch/SystemInfo.java b/core/src/main/java/info/openrocket/core/arch/SystemInfo.java index 905b97702..d6aebe872 100644 --- a/core/src/main/java/info/openrocket/core/arch/SystemInfo.java +++ b/core/src/main/java/info/openrocket/core/arch/SystemInfo.java @@ -28,9 +28,9 @@ public class SystemInfo { public static Platform getPlatform() { String os = System.getProperty("os.name").toLowerCase(Locale.ENGLISH); - if (os.indexOf("win") >= 0) { + if (os.contains("win")) { return Platform.WINDOWS; - } else if (os.indexOf("mac") >= 0) { + } else if (os.contains("mac")) { return Platform.MAC_OS; } else { /* diff --git a/core/src/test/java/info/openrocket/core/communication/BugReportTest.java b/core/src/test/java/info/openrocket/core/communication/BugReportTest.java index e077211db..55c9c9b8b 100644 --- a/core/src/test/java/info/openrocket/core/communication/BugReportTest.java +++ b/core/src/test/java/info/openrocket/core/communication/BugReportTest.java @@ -44,8 +44,8 @@ public class BugReportTest { check(connection); String msg = connection.getOutputStreamString(); - assertTrue(msg.indexOf("version=" + BuildProperties.getVersion()) >= 0); - assertTrue(msg.indexOf(Communicator.encode(message)) >= 0); + assertTrue(msg.contains("version=" + BuildProperties.getVersion())); + assertTrue(msg.contains(Communicator.encode(message))); } @Test