Permalink
Browse files

impose non-null settings

  • Loading branch information...
CodingCat committed Feb 27, 2014
1 parent 9aa2125 commit 8af81e7cf4451b3743b9491585944c6593f1c798
Showing with 7 additions and 8 deletions.
  1. +7 −8 repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala
@@ -182,16 +182,15 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter,
/** Create a new interpreter. */
def createInterpreter() {
- if (settings != null) {
- if (addedClasspath != "") settings.classpath.append(addedClasspath)
+ require(settings != null)
- // work around for Scala bug
- val totalClassPath = SparkILoop.getAddedJars.foldLeft(
- settings.classpath.value)((l, r) => ClassPath.join(l, r))
- this.settings.classpath.value = totalClassPath
+ if (addedClasspath != "") settings.classpath.append(addedClasspath)
+ // work around for Scala bug
+ val totalClassPath = SparkILoop.getAddedJars.foldLeft(
+ settings.classpath.value)((l, r) => ClassPath.join(l, r))
+ this.settings.classpath.value = totalClassPath
- intp = new SparkILoopInterpreter
- }
+ intp = new SparkILoopInterpreter
}
/** print a friendly help message */

0 comments on commit 8af81e7

Please sign in to comment.