Skip to content

Commit

Permalink
[FIXED JENKINS-30396] incorrect field initilization order broke Mac/L…
Browse files Browse the repository at this point in the history
…inux detection
  • Loading branch information
lacostej committed Sep 11, 2015
1 parent 0ee098b commit e7c8ad2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/jenkinsci/plugins/unity3d/Functions2.java
@@ -1,16 +1,16 @@
package org.jenkinsci.plugins.unity3d;

class Functions2 {
private static final String OS_NAME = System.getProperty("os.name");
private static final boolean IS_OS_LINUX = getOSMatchesName("Linux") || getOSMatchesName("LINUX");
private static final boolean IS_OS_MAC = getOSMatchesName("Mac");

public static boolean isMac() {
return IS_OS_MAC;
}
public static boolean isLinux() {
return IS_OS_LINUX;
}
private static final boolean IS_OS_LINUX = getOSMatchesName("Linux") || getOSMatchesName("LINUX");
private static final boolean IS_OS_MAC = getOSMatchesName("Mac");

private static final String OS_NAME = System.getProperty("os.name");

private static boolean getOSMatchesName(String osNamePrefix) {
return isOSNameMatch(OS_NAME, osNamePrefix);
Expand Down

0 comments on commit e7c8ad2

Please sign in to comment.