This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git
The following commit(s) were added to refs/heads/master by this push:
new 4083b7a Use final.
4083b7a is described below
commit 4083b7a2a0e7c2fa952b034614224fe6dc786b34
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jul 8 12:11:04 2021 -0400
Use final.
---
.../java/org/apache/commons/csv/CSVPrinterTest.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
index 4846532..780a502 100644
--- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
@@ -90,7 +90,7 @@ public class CSVPrinterTest {
private String longText2;
private final String recordSeparator =
CSVFormat.DEFAULT.getRecordSeparator();
-
+
private void doOneRandom(final CSVFormat format) throws Exception {
final Random r = new Random();
@@ -164,7 +164,7 @@ public class CSVPrinterTest {
throws IOException {
// Use withHeaderComments first to test CSV-145
// @formatter:off
- CSVFormat format = baseFormat.builder()
+ final CSVFormat format = baseFormat.builder()
.setHeaderComments("Generated by Apache Commons CSV 1.1", now)
.setCommentMarker('#')
.setHeader("Col1", "Col2")
@@ -1270,8 +1270,8 @@ public class CSVPrinterTest {
+ "a4,b4\n"// 4)
;
final String[][] res = {{"a1", "b1"}, {"a2", "b2"}, {"a3", "b3"},
{"a4", "b4"}};
- CSVFormat format = CSVFormat.DEFAULT;
- StringWriter sw = new StringWriter();
+ final CSVFormat format = CSVFormat.DEFAULT;
+ final StringWriter sw = new StringWriter();
try (final CSVPrinter printer = format.print(sw); final CSVParser
parser = CSVParser.parse(code, format)) {
printer.printRecords(parser);
}
@@ -1290,10 +1290,10 @@ public class CSVPrinterTest {
+ "a4,b4\n"// 4)
;
final String[][] res = {{"a1", "b1"}, {"a2", "b2"}, {"a3", "b3"},
{"a4", "b4"}};
- CSVFormat format = CSVFormat.DEFAULT;
- StringWriter sw = new StringWriter();
+ final CSVFormat format = CSVFormat.DEFAULT;
+ final StringWriter sw = new StringWriter();
try (final CSVPrinter printer = format.print(sw); final CSVParser
parser = CSVParser.parse(code, format)) {
- for (CSVRecord record : parser) {
+ for (final CSVRecord record : parser) {
printer.printRecord(record);
}
}
@@ -1312,8 +1312,8 @@ public class CSVPrinterTest {
+ "a4,b4\n"// 4)
;
final String[][] res = {{"a1", "b1"}, {"a2", "b2"}, {"a3", "b3"},
{"a4", "b4"}};
- CSVFormat format = CSVFormat.DEFAULT;
- StringWriter sw = new StringWriter();
+ final CSVFormat format = CSVFormat.DEFAULT;
+ final StringWriter sw = new StringWriter();
try (final CSVPrinter printer = format.print(sw); final CSVParser
parser = CSVParser.parse(code, format)) {
printer.printRecords(parser.getRecords());
}