diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv198Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv198Test.java index 1dd072bf..996e2eb3 100644 --- a/src/test/java/org/apache/commons/csv/issues/JiraCsv198Test.java +++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv198Test.java @@ -26,7 +26,6 @@ import java.nio.charset.StandardCharsets; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; import org.junit.jupiter.api.Test; public class JiraCsv198Test { diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv211Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv211Test.java index f90f18b0..86d15935 100644 --- a/src/test/java/org/apache/commons/csv/issues/JiraCsv211Test.java +++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv211Test.java @@ -23,7 +23,6 @@ import java.io.StringReader; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; -import org.apache.commons.csv.CSVRecord; import org.junit.jupiter.api.Test; public class JiraCsv211Test { diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv290Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv290Test.java index 106e7a19..50d3cd9d 100644 --- a/src/test/java/org/apache/commons/csv/issues/JiraCsv290Test.java +++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv290Test.java @@ -55,12 +55,12 @@ import org.junit.jupiter.api.Test; // 3 a b,c,d "quoted" e // public class JiraCsv290Test { - private void testHelper(String filename, CSVFormat format) throws Exception { - List> content = new ArrayList<>(); + private void testHelper(final String filename, final CSVFormat format) throws Exception { + final List> content = new ArrayList<>(); try (CSVParser csvParser = CSVParser.parse(new InputStreamReader( this.getClass().getResourceAsStream("/org/apache/commons/csv/CSV-290/" + filename)), format)) { for (CSVRecord csvRecord : csvParser) { - List row = new ArrayList<>(); + final List row = new ArrayList<>(); content.add(row); for (int i = 0; i < csvRecord.size(); i++) { row.add(csvRecord.get(i)); @@ -96,9 +96,9 @@ public class JiraCsv290Test { @Test public void testWriteThenRead() throws Exception { - StringWriter sw = new StringWriter(); + final StringWriter sw = new StringWriter(); - CSVPrinter printer = new CSVPrinter(sw, + final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.POSTGRESQL_CSV.builder().setHeader().setSkipHeaderRecord(true).build()); printer.printRecord("column1", "column2"); @@ -106,12 +106,12 @@ public class JiraCsv290Test { printer.printRecord("v21", "v22"); printer.close(); - CSVParser parser = new CSVParser(new StringReader(sw.toString()), + final CSVParser parser = new CSVParser(new StringReader(sw.toString()), CSVFormat.POSTGRESQL_CSV.builder().setHeader().setSkipHeaderRecord(true).build()); assertArrayEquals(new Object[] { "column1", "column2" }, parser.getHeaderNames().toArray()); - Iterator i = parser.iterator(); + final Iterator i = parser.iterator(); assertArrayEquals(new String[] { "v11", "v12" }, i.next().toList().toArray()); assertArrayEquals(new String[] { "v21", "v22" }, i.next().toList().toArray()); }