aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildfile1
-rw-r--r--src/main/scala/spark/repl/SparkCompletion.scala4
2 files changed, 3 insertions, 2 deletions
diff --git a/buildfile b/buildfile
index aaec9dc1bf..1fb9046e92 100644
--- a/buildfile
+++ b/buildfile
@@ -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)