Skip to content

Commit

Permalink
add final for readData methods (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuwenwei authored Dec 27, 2024
1 parent 654e509 commit d5e87ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,7 @@ public long fileSize() throws IOException {
* @param totalSize the size of data that want to read
* @return data that been read.
*/
protected ByteBuffer readData(long position, int totalSize) throws IOException {
protected final ByteBuffer readData(long position, int totalSize) throws IOException {
return readData(position, totalSize, null);
}

Expand Down Expand Up @@ -1986,7 +1986,7 @@ protected ByteBuffer readData(long position, int totalSize, LongConsumer ioSizeR
* @param end the end position of data that want to read
* @return data that been read.
*/
protected ByteBuffer readData(long start, long end) throws IOException {
protected final ByteBuffer readData(long start, long end) throws IOException {
return readData(start, end, null);
}

Expand All @@ -2000,7 +2000,7 @@ protected ByteBuffer readData(long start, long end) throws IOException {
* @param ioSizeRecorder can be null
* @return data that been read.
*/
protected ByteBuffer readData(long start, long end, LongConsumer ioSizeRecorder)
protected final ByteBuffer readData(long start, long end, LongConsumer ioSizeRecorder)
throws IOException {
try {
return readData(start, (int) (end - start), ioSizeRecorder);
Expand Down

0 comments on commit d5e87ec

Please sign in to comment.