aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/pom.xml4
-rw-r--r--core/src/main/scala/org/apache/spark/util/Utils.scala5
2 files changed, 6 insertions, 3 deletions
diff --git a/core/pom.xml b/core/pom.xml
index 822b5b1dd7..36c71e67b5 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -70,6 +70,10 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala
index acd7eef6d2..bef4dab3d7 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -32,6 +32,7 @@ import scala.util.Try
import com.google.common.io.Files
import com.google.common.util.concurrent.ThreadFactoryBuilder
+import org.apache.commons.lang3.SystemUtils
import org.apache.hadoop.fs.{FileSystem, FileUtil, Path}
import org.json4s._
import tachyon.client.{TachyonFile,TachyonFS}
@@ -1073,9 +1074,7 @@ private[spark] object Utils extends Logging {
/**
* Return true if this is Windows.
*/
- def isWindows = {
- Option(System.getProperty("os.name")).exists(_.startsWith("Windows"))
- }
+ def isWindows = SystemUtils.IS_OS_WINDOWS
/**
* Indicates whether Spark is currently running unit tests.