Use String.contains
This commit is contained in:
parent
fd3f2e167c
commit
4952320030
@ -28,9 +28,9 @@ public class SystemInfo {
|
|||||||
public static Platform getPlatform() {
|
public static Platform getPlatform() {
|
||||||
String os = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
|
String os = System.getProperty("os.name").toLowerCase(Locale.ENGLISH);
|
||||||
|
|
||||||
if (os.indexOf("win") >= 0) {
|
if (os.contains("win")) {
|
||||||
return Platform.WINDOWS;
|
return Platform.WINDOWS;
|
||||||
} else if (os.indexOf("mac") >= 0) {
|
} else if (os.contains("mac")) {
|
||||||
return Platform.MAC_OS;
|
return Platform.MAC_OS;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
@ -44,8 +44,8 @@ public class BugReportTest {
|
|||||||
check(connection);
|
check(connection);
|
||||||
|
|
||||||
String msg = connection.getOutputStreamString();
|
String msg = connection.getOutputStreamString();
|
||||||
assertTrue(msg.indexOf("version=" + BuildProperties.getVersion()) >= 0);
|
assertTrue(msg.contains("version=" + BuildProperties.getVersion()));
|
||||||
assertTrue(msg.indexOf(Communicator.encode(message)) >= 0);
|
assertTrue(msg.contains(Communicator.encode(message)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user