In the code sample below, two Path elements are added (one for data and one for temp), is this a bug ?
import java.util.List
import java.nio.file.Path
import java.util.ArrayList
import java.nio.file.Paths
class PathAdd {
def static void main(String[] args) {
val List<Path> paths = new ArrayList
val path = Paths.get('c:/data/temp')
paths += path
println(paths.size) // => 2
}
}