Author: ggregory Date: Mon Jan 18 20:52:21 2016 New Revision: 1725344 URL: http://svn.apache.org/viewvc?rev=1725344&view=rev Log: Use final.
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/JiraCsv167Test.java Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1725344&r1=1725343&r2=1725344&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Mon Jan 18 20:52:21 2016 @@ -181,7 +181,7 @@ public final class CSVFormat implements private final CSVFormat format; - private Predefined(CSVFormat format) { + private Predefined(final CSVFormat format) { this.format = format; } Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java?rev=1725344&r1=1725343&r2=1725344&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java (original) +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVFormatTest.java Mon Jan 18 20:52:21 2016 @@ -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)); } Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/JiraCsv167Test.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/JiraCsv167Test.java?rev=1725344&r1=1725343&r2=1725344&view=diff ============================================================================== --- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/JiraCsv167Test.java (original) +++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/JiraCsv167Test.java Mon Jan 18 20:52:21 2016 @@ -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 {