This repository was archived by the owner on Jun 3, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -259,10 +259,9 @@ public synchronized void println() throws IOException {
259259 * @throws IOException
260260 * If an I/O error occurs
261261 */
262+ @ SuppressWarnings ("resource" )
262263 public synchronized void printRecord (final Iterable <?> values ) throws IOException {
263- for (final Object value : values ) {
264- print (value );
265- }
264+ IOStream .of (values ).forEachOrdered (this ::print );
266265 println ();
267266 }
268267
@@ -352,10 +351,9 @@ private void printRecordObject(final Object value) throws IOException {
352351 * @throws IOException
353352 * If an I/O error occurs
354353 */
354+ @ SuppressWarnings ("resource" )
355355 public void printRecords (final Iterable <?> values ) throws IOException {
356- for (final Object value : values ) {
357- printRecordObject (value );
358- }
356+ IOStream .of (values ).forEachOrdered (this ::printRecordObject );
359357 }
360358
361359 /**
You can’t perform that action at this time.
0 commit comments