Skip to content

Commit

Permalink
impose non-null settings
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingCat committed Feb 27, 2014
1 parent 9aa2125 commit 8af81e7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8af81e7

Please sign in to comment.