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
Original file line number Original file line Diff line number Diff line change
@@ -1,16 +1,16 @@
package org.jenkinsci.plugins.unity3d; package org.jenkinsci.plugins.unity3d;


class Functions2 { 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() { public static boolean isMac() {
return IS_OS_MAC; return IS_OS_MAC;
} }
public static boolean isLinux() { public static boolean isLinux() {
return IS_OS_LINUX; 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) { private static boolean getOSMatchesName(String osNamePrefix) {
return isOSNameMatch(OS_NAME, osNamePrefix); return isOSNameMatch(OS_NAME, osNamePrefix);
Expand Down

0 comments on commit e7c8ad2

Please sign in to comment.