From 7f10281792d46de3ff52af6d69bb24df201b9bad Mon Sep 17 00:00:00 2001 From: Mathis Chenuet Date: Sun, 25 Jan 2015 18:38:27 +0000 Subject: [PATCH] Use String.contains instead of String.indexof --- src/com/sheepit/client/os/OS.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/sheepit/client/os/OS.java b/src/com/sheepit/client/os/OS.java index 9e92aa6..0c4f9bf 100644 --- a/src/com/sheepit/client/os/OS.java +++ b/src/com/sheepit/client/os/OS.java @@ -57,13 +57,13 @@ public abstract class OS { public static OS getOS() { String os = System.getProperty("os.name").toLowerCase(); - if (os.indexOf("win") >= 0) { + if (os.contains("win")) { return new Windows(); } - else if (os.indexOf("mac") >= 0) { + else if (os.contains("mac")) { return new Mac(); } - else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) { + else if (os.contains("nix") || os.contains("nux")) { return new Linux(); } else {