Skip to content

Commit 453cfcb

Browse files
committed
Use final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1725344 13f79535-47bb-0310-9956-ffa450edef68
1 parent 54597a8 commit 453cfcb

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/main/java/org/apache/commons/csv/CSVFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static enum Predefined {
181181

182182
private final CSVFormat format;
183183

184-
private Predefined(CSVFormat format) {
184+
private Predefined(final CSVFormat format) {
185185
this.format = format;
186186
}
187187

src/test/java/org/apache/commons/csv/CSVFormatTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,26 +379,26 @@ public void testWithHeader() throws Exception {
379379
@Test
380380
public void testJiraCsv154_withCommentMarker() throws IOException {
381381
final String comment = "This is a header comment";
382-
CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withCommentMarker('#').withHeaderComments(comment);
383-
StringBuilder out = new StringBuilder();
382+
final CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withCommentMarker('#').withHeaderComments(comment);
383+
final StringBuilder out = new StringBuilder();
384384
final CSVPrinter printer = format.print(out);
385385
printer.print("A");
386386
printer.print("B");
387387
printer.close();
388-
String s = out.toString();
388+
final String s = out.toString();
389389
Assert.assertTrue(s, s.contains(comment));
390390
}
391391

392392
@Test
393393
public void testJiraCsv154_withHeaderComments() throws IOException {
394394
final String comment = "This is a header comment";
395-
CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withHeaderComments(comment).withCommentMarker('#');
396-
StringBuilder out = new StringBuilder();
395+
final CSVFormat format = CSVFormat.EXCEL.withHeader("H1", "H2").withHeaderComments(comment).withCommentMarker('#');
396+
final StringBuilder out = new StringBuilder();
397397
final CSVPrinter printer = format.print(out);
398398
printer.print("A");
399399
printer.print("B");
400400
printer.close();
401-
String s = out.toString();
401+
final String s = out.toString();
402402
Assert.assertTrue(s, s.contains(comment));
403403
}
404404

src/test/java/org/apache/commons/csv/JiraCsv167Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class JiraCsv167Test {
2929
@Test
3030
@Ignore("Fails")
3131
public void parse() throws IOException {
32-
File csvData = new File("src/test/resources/csv-167/sample1.csv");
32+
final File csvData = new File("src/test/resources/csv-167/sample1.csv");
3333
CSVFormat format = CSVFormat.DEFAULT;
3434
//
3535
format = format.withAllowMissingColumnNames(false);
@@ -46,10 +46,10 @@ public void parse() throws IOException {
4646
format = format.withRecordSeparator('\n');
4747
format = format.withSkipHeaderRecord(false);
4848
//
49-
CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), format);
49+
final CSVParser parser = CSVParser.parse(csvData, Charset.defaultCharset(), format);
5050
int comments = 0;
5151
int records = 0;
52-
for (CSVRecord csvRecord : parser) {
52+
for (final CSVRecord csvRecord : parser) {
5353
if (csvRecord.isComment()) {
5454
comments++;
5555
} else {

0 commit comments

Comments
 (0)