I have an existing Java method like this:
public static MyJavaClass javaFunc(String name, long... values) {
...
}
and I need to call it from Scala with this:
val idList: Seq[Long] = Seq(1L, 2L, 3L)
MyJavaClass.javaFunc("hello", idList)
but it ends up invoking the toString method on the idList parameter. I've tried the following to no avail:
MyJavaClass.javaFunc("hello", idList:_*)
which causes compile error:
no `: _*' annotation allowed here (such annotations are only allowed in arguments to *-parameters)
How can I pass the argument?