File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
core/src/main/scala/org/apache/spark/util Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,7 @@ private[spark] object DependencyUtils extends Logging {
165
165
ivyRepoPath : Option [String ],
166
166
ivySettingsPath : Option [String ]): Seq [String ] = {
167
167
val exclusions : Seq [String ] =
168
- if (packagesExclusions.nonEmpty) {
169
- packagesExclusions.map(_.split(" ," )).get
170
- } else {
171
- Nil
172
- }
168
+ packagesExclusions.map(_.split(" ," )).getOrElse[Seq [String ]](Nil )
173
169
// Create the IvySettings, either load from file or build defaults
174
170
val ivySettings = ivySettingsPath match {
175
171
case Some (path) =>
@@ -179,7 +175,7 @@ private[spark] object DependencyUtils extends Logging {
179
175
SparkSubmitUtils .buildIvySettings(repositories, ivyRepoPath)
180
176
}
181
177
182
- SparkSubmitUtils .resolveMavenCoordinates(packages.get , ivySettings,
178
+ SparkSubmitUtils .resolveMavenCoordinates(packages.orNull , ivySettings,
183
179
transitive = packagesTransitive, exclusions = exclusions)
184
180
}
185
181
You can’t perform that action at this time.
0 commit comments