This is an automated email from the ASF dual-hosted git repository. sebb 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 acda845 identify class fields acda845 is described below commit acda84537b9f3031bf3f61727225541ec088191e Author: Sebb <s...@apache.org> AuthorDate: Tue Aug 11 13:14:56 2020 +0100 identify class fields --- .../commons/io/input/ReversedLinesFileReader.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java b/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java index dbdd66d..38f55e3 100644 --- a/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java +++ b/src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java @@ -166,23 +166,23 @@ public class ReversedLinesFileReader implements Closeable { } // NOTE: The new line sequences are matched in the order given, so it is important that \r\n is BEFORE \n - newLineSequences = new byte[][] {"\r\n".getBytes(encoding), "\n".getBytes(encoding), "\r".getBytes(encoding)}; + this.newLineSequences = new byte[][] {"\r\n".getBytes(encoding), "\n".getBytes(encoding), "\r".getBytes(encoding)}; - avoidNewlineSplitBufferSize = newLineSequences[0].length; + this.avoidNewlineSplitBufferSize = newLineSequences[0].length; // Open file - channel = Files.newByteChannel(file, StandardOpenOption.READ); - totalByteLength = channel.size(); - int lastBlockLength = (int) (totalByteLength % blockSize); + this.channel = Files.newByteChannel(file, StandardOpenOption.READ); + this.totalByteLength = channel.size(); + int lastBlockLength = (int) (this.totalByteLength % blockSize); if (lastBlockLength > 0) { - totalBlockCount = totalByteLength / blockSize + 1; + this.totalBlockCount = this.totalByteLength / blockSize + 1; } else { - totalBlockCount = totalByteLength / blockSize; - if (totalByteLength > 0) { + this.totalBlockCount = this.totalByteLength / blockSize; + if (this.totalByteLength > 0) { lastBlockLength = blockSize; } } - currentFilePart = new FilePart(totalBlockCount, lastBlockLength, null); + this.currentFilePart = new FilePart(totalBlockCount, lastBlockLength, null); }