File tree Expand file tree Collapse file tree
main/java/org/apache/commons/csv
test/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ public synchronized void printRecord(final Stream<?> values) throws IOException
312312 values .forEachOrdered (t -> {
313313 try {
314314 print (t );
315- } catch (IOException e ) {
315+ } catch (final IOException e ) {
316316 throw rethrow (e );
317317 }
318318 });
@@ -501,7 +501,7 @@ public void printRecords(final Stream<?> values) throws IOException {
501501 values .forEachOrdered (t -> {
502502 try {
503503 printRecordObject (t );
504- } catch (IOException e ) {
504+ } catch (final IOException e ) {
505505 throw rethrow (e );
506506 }
507507 });
Original file line number Diff line number Diff line change @@ -1567,6 +1567,6 @@ public void testWithRecordSeparatorLF() {
15671567 @ Test
15681568 public void testWithSystemRecordSeparator () {
15691569 final CSVFormat formatWithRecordSeparator = CSVFormat .DEFAULT .withSystemRecordSeparator ();
1570- assertEquals (System .getProperty ( "line.separator" ), formatWithRecordSeparator .getRecordSeparator ());
1570+ assertEquals (System .lineSeparator ( ), formatWithRecordSeparator .getRecordSeparator ());
15711571 }
15721572}
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ public void testStream() {
274274
275275 @ Test
276276 public void testToListAdd () {
277- String [] expected = values .clone ();
277+ final String [] expected = values .clone ();
278278 final List <String > list = record .toList ();
279279 list .add ("Last" );
280280 assertEquals ("Last" , list .get (list .size () - 1 ));
@@ -293,15 +293,15 @@ public void testToListFor() {
293293
294294 @ Test
295295 public void testToListForEach () {
296- AtomicInteger i = new AtomicInteger ();
296+ final AtomicInteger i = new AtomicInteger ();
297297 record .toList ().forEach (e -> {
298298 assertEquals (values [i .getAndIncrement ()], e );
299299 });
300300 }
301301
302302 @ Test
303303 public void testToListSet () {
304- String [] expected = values .clone ();
304+ final String [] expected = values .clone ();
305305 final List <String > list = record .toList ();
306306 list .set (list .size () - 1 , "Last" );
307307 assertEquals ("Last" , list .get (list .size () - 1 ));
You can’t perform that action at this time.
0 commit comments