We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 676a580 commit 7694e8fCopy full SHA for 7694e8f
1 file changed
src/main/java/org/apache/commons/csv/CSVPrinter.java
@@ -26,6 +26,7 @@
26
import java.io.IOException;
27
import java.sql.ResultSet;
28
import java.sql.SQLException;
29
+import java.util.Arrays;
30
31
/**
32
* Prints values in a CSV format.
@@ -321,15 +322,7 @@ public void printRecords(final Iterable<?> values) throws IOException {
321
322
* If an I/O error occurs
323
*/
324
public void printRecords(final Object... values) throws IOException {
- for (final Object value : values) {
325
- if (value instanceof Object[]) {
326
- this.printRecord((Object[]) value);
327
- } else if (value instanceof Iterable) {
328
- this.printRecord((Iterable<?>) value);
329
- } else {
330
- this.printRecord(value);
331
- }
332
+ printRecords(Arrays.asList(values));
333
}
334
335
0 commit comments