JavaConversionsdoes not support conversion between scala List(immutable, recursive data structure) and java List(mutable sequence). An analog in scala is the buffer:
From scaladoc
The following conversions are
supported : scala.collection.mutable.Buffer <=> java.util.List
You might want to change your code to:
def getFeatures() : java.util.List[String]
= new ListBuffer[String] ++ csv.attributes.toList
source
share