This will be problematic to call from Java. The right workaround is this:
```
def dense(values: Array[Double]) { ... }
def dense(firstValue: Double, otherValues: Double*) { ... }
```
I believe it should work in Java too but you should try it (add Java unit tests for this)