Skip to content
Permalink
Browse files

[FIXED JENKINS-30396] incorrect field initilization order broke Mac/L…

…inux detection
  • Loading branch information
lacostej committed Sep 11, 2015
1 parent 0ee098b commit e7c8ad2bf825265a83b13787d2c796ad7c50c2fe
Showing with 4 additions and 4 deletions.
  1. +4 −4 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);

0 comments on commit e7c8ad2

Please sign in to comment.
You can’t perform that action at this time.