diff options
author | Robert Antoni Buj i Gelonch <robert.buj@gmail.com> | 2014-10-09 21:51:37 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-10-10 07:09:21 +0000 |
commit | 110ae4e498a55bd50ca0afe558126e9e029f68cd (patch) | |
tree | a7784faed1c2273fd80add17d12d68bc800dda46 /qadevOOo/runner/helper | |
parent | 999fb810673f7c1b490cdac1f29c2e931e8e7f2e (diff) |
runner: The if statement is redundant
Change-Id: Ida40034bdfe6a44a936db1243ad6c71616caada3
Reviewed-on: https://gerrit.libreoffice.org/11895
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo/runner/helper')
-rw-r--r-- | qadevOOo/runner/helper/OSHelper.java | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/qadevOOo/runner/helper/OSHelper.java b/qadevOOo/runner/helper/OSHelper.java index 41a10004f766..212a01b1655c 100644 --- a/qadevOOo/runner/helper/OSHelper.java +++ b/qadevOOo/runner/helper/OSHelper.java @@ -25,52 +25,31 @@ public class OSHelper { public static boolean isWindows() { - String sOSName = System.getProperty("os.name"); - if (sOSName.toLowerCase().startsWith("windows")) - { - return true; - } - return false; + return System.getProperty("os.name").toLowerCase().startsWith("windows"); } public static boolean isSolarisIntel() { - if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || - System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && - System.getProperty("os.arch").equals("x86")) - { - return true; - } - return false; + String sOSName = System.getProperty("os.name"); + return ( sOSName.toLowerCase().startsWith("solaris") || + sOSName.toLowerCase().startsWith("sunos") ) && + System.getProperty("os.arch").equals("x86"); } public static boolean isSolarisSparc() { - if ( ( System.getProperty("os.name").toLowerCase().startsWith("solaris") || - System.getProperty("os.name").toLowerCase().startsWith("sunos") ) && - System.getProperty("os.arch").equals("sparc")) - { - return true; - } - return false; + String sOSName = System.getProperty("os.name"); + return ( sOSName.toLowerCase().startsWith("solaris") || + sOSName.toLowerCase().startsWith("sunos") ) && + System.getProperty("os.arch").equals("sparc"); } public static boolean isLinuxIntel() { - if (System.getProperty("os.name").toLowerCase().startsWith("linux") && - System.getProperty("os.arch").equals("i386")) - { - return true; - } - return false; + return System.getProperty("os.name").toLowerCase().startsWith("linux") && + System.getProperty("os.arch").equals("i386"); } public static boolean isUnix() { - if (isLinuxIntel() || - isSolarisIntel() || - isSolarisSparc()) - { - return true; - } - return false; + return isLinuxIntel() || isSolarisIntel() || isSolarisSparc(); } } |