diff options
-rw-r--r-- | buildfile | 1 | ||||
-rw-r--r-- | src/main/scala/spark/repl/SparkCompletion.scala | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -17,6 +17,7 @@ define "spark" do project.group = GROUP manifest["Implementation-Vendor"] = COPYRIGHT compile.with THIRD_PARTY_JARS + compile.using :scalac package(:jar) test.using :scalatest, :fork => true end diff --git a/src/main/scala/spark/repl/SparkCompletion.scala b/src/main/scala/spark/repl/SparkCompletion.scala index ac70db4dbe..9fa41736f3 100644 --- a/src/main/scala/spark/repl/SparkCompletion.scala +++ b/src/main/scala/spark/repl/SparkCompletion.scala @@ -310,7 +310,7 @@ class SparkCompletion(val repl: SparkInterpreter) extends SparkCompletionOutput else xs.reduceLeft(_ zip _ takeWhile (x => x._1 == x._2) map (_._1) mkString) // This is jline's entry point for completion. - override def complete(_buf: String, cursor: Int, candidates: JList[_]): Int = { + override def complete(_buf: String, cursor: Int, candidates: java.util.List[java.lang.String]): Int = { val buf = onull(_buf) verbosity = if (isConsecutiveTabs(buf, cursor)) verbosity + 1 else 0 DBG("complete(%s, %d) last = (%s, %d), verbosity: %s".format(buf, cursor, lastBuf, lastCursor, verbosity)) @@ -321,7 +321,7 @@ class SparkCompletion(val repl: SparkInterpreter) extends SparkCompletionOutput case Nil => None case xs => // modify in place and return the position - xs.foreach(x => candidates.asInstanceOf[JList[AnyRef]].add(x)) + xs.foreach(x => candidates.add(x)) // update the last buffer unless this is an alternatives list if (xs contains "") Some(p.cursor) |