Open
Description
Currently, DefaultConvertService
supports conversion from File[]
to String
and vice versa, but the result is wrong (i.e. a String
representation of the File[]
array, such as [Ljava.io.File;@31c3cff5
).
The following Groovy script illustrates the issue:
#@ ConvertService cs
import java.io.File
file1 = new File("test1.csv")
file2 = new File("test2.csv")
File[] fileList = [file1, file2].toArray()
println fileList.getClass() // class [Ljava.io.File;
println cs.supports(fileList, String.class) // true
println cs.convert(fileList, String.class) // [Ljava.io.File;@31c3cff5
(The expected re-convertible output in this case should be something like test1.csv\ntest2.csv
, ideally with the absolute paths of the files)
See also some related discussion in scijava/scijava-ui-swing#27.
Metadata
Metadata
Assignees
Labels
No labels