aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-process/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-process/src')
-rw-r--r--server/sonar-process/src/main/java/org/sonar/process/System2.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/System2.java b/server/sonar-process/src/main/java/org/sonar/process/System2.java
index 1c9ca5c51c6..0e32165046c 100644
--- a/server/sonar-process/src/main/java/org/sonar/process/System2.java
+++ b/server/sonar-process/src/main/java/org/sonar/process/System2.java
@@ -20,6 +20,7 @@
package org.sonar.process;
import java.util.Map;
+import org.apache.commons.lang.SystemUtils;
/**
* An interface allowing to wrap around static call to {@link System} class.
@@ -35,6 +36,11 @@ public interface System2 {
public String getenv(String name) {
return System.getenv(name);
}
+
+ @Override
+ public boolean isOsWindows() {
+ return SystemUtils.IS_OS_WINDOWS;
+ }
};
/**
@@ -46,4 +52,9 @@ public interface System2 {
* Proxy to {@link System#getenv(String)}.
*/
String getenv(String name);
+
+ /**
+ * True if this is MS Windows.
+ */
+ boolean isOsWindows();
}