Skip to content

Commit

Permalink
[SPARK-26137][CORE] Use File.separatorChar instead of File.separator
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Pavey committed Nov 27, 2018
1 parent 4ab68f0 commit e1e97aa
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package org.apache.spark.deploy

import java.io.File
import java.net.URI
import java.util.regex.Pattern

import org.apache.commons.lang3.StringUtils
import org.apache.hadoop.conf.Configuration
Expand Down Expand Up @@ -62,8 +61,7 @@ private[deploy] object DependencyUtils extends Logging {
hadoopConf: Configuration,
secMgr: SecurityManager): String = {
val targetDir = Utils.createTempDir()
val fileSeparator = Pattern.quote(File.separator)
val userJarName = userJar.split(fileSeparator).last
val userJarName = userJar.split(File.separatorChar).last
Option(jars)
.map {
resolveGlobPaths(_, hadoopConf)
Expand Down

0 comments on commit e1e97aa

Please sign in to comment.