I am using this:
List<String> row = new ArrayList<String>();
row.add("value 1");
row.add("value 2");
writer.writeRow(row);
Which outputs what's essentially an ArrayList toString() value:
"[value1, value2]"
How to obtain the following?
"value1, value2"
To make matters worse, headers are written correctly from a List:
I looked at some of their examples (specifically com.univocity.parsers.examples.CsvWriterExamples) and saw the output was correct.
So I got to this:
Which also produced a correct output.
Since there's also an overloaded method with a (Object... object) parameter, my guess is Java uses that one.
My issue can be fixed by casting the List to a Collection.
I know this is pretty much how Java works, but I think most people would prefer avoiding primitives if extreme performance is not needed, so this should work out of the box - possibly with a different signature method.