diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java index 409c0f4b..9a8a81c6 100644 --- a/src/main/java/org/apache/commons/csv/CSVFormat.java +++ b/src/main/java/org/apache/commons/csv/CSVFormat.java @@ -181,7 +181,7 @@ public final class CSVFormat implements Serializable { private final CSVFormat format; - private Predefined(CSVFormat format) { + private Predefined(final CSVFormat format) { this.format = format; } diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java b/src/test/java/org/apache/commons/csv/CSVFormatTest.java index e0a5fa3a..d24c4dbf 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java @@ -379,26 +379,26 @@ public class CSVFormatTest { @Test public void testJiraCsv154_withCommentMarker() throws IOException { final String comment = "This is a header comment"; - CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withCommentMarker('#').withHeaderComments(comment); - StringBuilder out = new StringBuilder(); + final CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withCommentMarker('#').withHeaderComments(comment); + final StringBuilder out = new StringBuilder(); final CSVPrinter printer = format.print(out); printer.print("A"); printer.print("B"); printer.close(); - String s = out.toString(); + final String s = out.toString(); Assert.assertTrue(s, s.contains(comment)); } @Test public void testJiraCsv154_withHeaderComments() throws IOException { final String comment = "This is a header comment"; - CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withHeaderComments(comment).withCommentMarker('#'); - StringBuilder out = new StringBuilder(); + final CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withHeaderComments(comment).withCommentMarker('#'); + final StringBuilder out = new StringBuilder(); final CSVPrinter printer = format.print(out); printer.print("A"); printer.print("B"); printer.close(); - String s = out.toString(); + final String s = out.toString(); Assert.assertTrue(s, s.contains(comment)); } diff --git a/src/test/java/org/apache/commons/csv/JiraCsv167Test.java b/src/test/java/org/apache/commons/csv/JiraCsv167Test.java index d8973d46..602228c8 100644 --- a/src/test/java/org/apache/commons/csv/JiraCsv167Test.java +++ b/src/test/java/org/apache/commons/csv/JiraCsv167Test.java @@ -29,7 +29,7 @@ public class JiraCsv167Test { @Test @Ignore("Fails") public void parse() throws IOException { - File csvData = new File("src/test/resources/csv-167/sample1.csv"); + final File csvData = new File("src/test/resources/csv-167/sample1.csv"); CSVFormat format = CSVFormat.DEFAULT; // format = format.withAllowMissingColumnNames(false); @@ -46,10 +46,10 @@ public class JiraCsv167Test { format = format.withRecordSeparator('\n'); format = format.withSkipHeaderRecord(false); // - CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), format); + final CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), format); int comments = 0; int records = 0; - for (CSVRecord csvRecord : parser) { + for (final CSVRecord csvRecord : parser) { if (csvRecord.isComment()) { comments++; } else {