You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/23 18:05:44 UTC
[commons-io] branch master updated: Formatting nits.
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-io.git
The following commit(s) were added to refs/heads/master by this push:
new ddf008f Formatting nits.
ddf008f is described below
commit ddf008f5a887116ffde5ef288cdb95e32b1c047c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Sep 23 14:05:41 2021 -0400
Formatting nits.
---
.../io/input/ReversedLinesFileReaderTestParamFile.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java b/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
index 7f6a16c..0ae9485 100644
--- a/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
+++ b/src/test/java/org/apache/commons/io/input/ReversedLinesFileReaderTestParamFile.java
@@ -52,11 +52,13 @@ public class ReversedLinesFileReaderTestParamFile {
final Path sourcePath = TestResources.getPath("test-file-utf8-win-linebr.bin");
final Path targetPath = Files.createTempFile("ReversedLinesFileReaderTestParamFile", ".bin");
try (Reader input = Files.newBufferedReader(sourcePath, StandardCharsets.UTF_8);
- Writer output = Files.newBufferedWriter(targetPath, Charset.defaultCharset())) {
+ Writer output = Files.newBufferedWriter(targetPath, Charset.defaultCharset())) {
IOUtils.copyLarge(input, output);
}
// All tests
- return Stream.of(Arguments.of(targetPath.toAbsolutePath().toString(), null, null, false, false),
+ // @formatter:off
+ return Stream.of(
+ Arguments.of(targetPath.toAbsolutePath().toString(), null, null, false, false),
Arguments.of("test-file-20byteslength.bin", "ISO_8859_1", null, false, true),
Arguments.of("test-file-iso8859-1-shortlines-win-linebr.bin", "ISO_8859_1", null, false, true),
Arguments.of("test-file-iso8859-1.bin", "ISO_8859_1", null, false, true),
@@ -75,13 +77,13 @@ public class ReversedLinesFileReaderTestParamFile {
Arguments.of("test-file-gbk.bin", "gbk", null, false, true),
Arguments.of("test-file-x-windows-949.bin", "x-windows-949", null, false, true),
Arguments.of("test-file-x-windows-950.bin", "x-windows-950", null, false, true)));
+ // @formatter:on
}
@ParameterizedTest(name = "{0}, encoding={1}, blockSize={2}, useNonDefaultFileSystem={3}, isResource={4}")
@MethodSource
- public void testDataIntegrityWithBufferedReader(final String fileName, final String charsetName,
- final Integer blockSize, final boolean useNonDefaultFileSystem, final boolean isResource)
- throws IOException, URISyntaxException {
+ public void testDataIntegrityWithBufferedReader(final String fileName, final String charsetName, final Integer blockSize,
+ final boolean useNonDefaultFileSystem, final boolean isResource) throws IOException, URISyntaxException {
Path filePath = isResource ? TestResources.getPath(fileName) : Paths.get(fileName);
FileSystem fileSystem = null;
@@ -92,9 +94,8 @@ public class ReversedLinesFileReaderTestParamFile {
// We want to test null Charset in the ReversedLinesFileReaderconstructor.
final Charset charset = charsetName != null ? Charset.forName(charsetName) : null;
- try (ReversedLinesFileReader reversedLinesFileReader = blockSize == null
- ? new ReversedLinesFileReader(filePath, charset)
- : new ReversedLinesFileReader(filePath, blockSize, charset)) {
+ try (ReversedLinesFileReader reversedLinesFileReader = blockSize == null ? new ReversedLinesFileReader(filePath, charset)
+ : new ReversedLinesFileReader(filePath, blockSize, charset)) {
final Stack<String> lineStack = new Stack<>();
String line;