Skip to content

Commit b498cda

Browse files
committed
Refactor magic int into a constant.
1 parent 68a73b5 commit b498cda

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/org/apache/commons/io/input/ReversedLinesFileReader.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
*/
3636
public class ReversedLinesFileReader implements Closeable {
3737

38+
private static final int DEFAULT_BLOCK_SIZE = 4096;
39+
3840
private final int blockSize;
3941
private final Charset encoding;
4042

@@ -62,7 +64,7 @@ public class ReversedLinesFileReader implements Closeable {
6264
*/
6365
@Deprecated
6466
public ReversedLinesFileReader(final File file) throws IOException {
65-
this(file, 4096, Charset.defaultCharset());
67+
this(file, DEFAULT_BLOCK_SIZE, Charset.defaultCharset());
6668
}
6769

6870
/**
@@ -76,7 +78,7 @@ public ReversedLinesFileReader(final File file) throws IOException {
7678
* @since 2.5
7779
*/
7880
public ReversedLinesFileReader(final File file, final Charset charset) throws IOException {
79-
this(file, 4096, charset);
81+
this(file, DEFAULT_BLOCK_SIZE, charset);
8082
}
8183

8284
/**

0 commit comments

Comments
 (0)