Skip to content

Commit 8af81e7

Browse files
committed
impose non-null settings
1 parent 9aa2125 commit 8af81e7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,15 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter,
182182

183183
/** Create a new interpreter. */
184184
def createInterpreter() {
185-
if (settings != null) {
186-
if (addedClasspath != "") settings.classpath.append(addedClasspath)
185+
require(settings != null)
187186

188-
// work around for Scala bug
189-
val totalClassPath = SparkILoop.getAddedJars.foldLeft(
190-
settings.classpath.value)((l, r) => ClassPath.join(l, r))
191-
this.settings.classpath.value = totalClassPath
187+
if (addedClasspath != "") settings.classpath.append(addedClasspath)
188+
// work around for Scala bug
189+
val totalClassPath = SparkILoop.getAddedJars.foldLeft(
190+
settings.classpath.value)((l, r) => ClassPath.join(l, r))
191+
this.settings.classpath.value = totalClassPath
192192

193-
intp = new SparkILoopInterpreter
194-
}
193+
intp = new SparkILoopInterpreter
195194
}
196195

197196
/** print a friendly help message */

0 commit comments

Comments
 (0)