From 8a5a0656d79db4cedc5c312dac45a8928f2c3ada Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sat, 10 Jul 2021 09:44:52 -0400 Subject: [PATCH] Use final. --- .../apache/commons/csv/issues/JiraCsv167Test.java | 2 +- .../apache/commons/csv/issues/JiraCsv203Test.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv167Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv167Test.java index a8d09a55..7f608327 100644 --- a/src/test/java/org/apache/commons/csv/issues/JiraCsv167Test.java +++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv167Test.java @@ -50,7 +50,7 @@ public class JiraCsv167Test { } } } - CSVFormat format = CSVFormat.DEFAULT.builder() + final CSVFormat format = CSVFormat.DEFAULT.builder() // @formatter:off .setAllowMissingColumnNames(false) .setCommentMarker('#') diff --git a/src/test/java/org/apache/commons/csv/issues/JiraCsv203Test.java b/src/test/java/org/apache/commons/csv/issues/JiraCsv203Test.java index 4c0d398b..ceb41328 100644 --- a/src/test/java/org/apache/commons/csv/issues/JiraCsv203Test.java +++ b/src/test/java/org/apache/commons/csv/issues/JiraCsv203Test.java @@ -38,7 +38,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.ALL) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -54,7 +54,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.ALL_NON_NULL) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -69,7 +69,7 @@ public class JiraCsv203Test { .setIgnoreSurroundingSpaces(true) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -85,7 +85,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.MINIMAL) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -101,7 +101,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.NON_NUMERIC) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -117,7 +117,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.ALL) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord(null, "Hello", null, "World"); } @@ -133,7 +133,7 @@ public class JiraCsv203Test { .setQuoteMode(QuoteMode.ALL) .build(); // @formatter:on - final StringBuffer buffer = new StringBuffer(); + final StringBuilder buffer = new StringBuilder(); try (final CSVPrinter printer = new CSVPrinter(buffer, format)) { printer.printRecord("", "Hello", "", "World"); // printer.printRecord(new Object[] { null, "Hello", null, "World" });