Skip to content

Commit

Permalink
[to dev/1.1] Add final for readData methods (#347)
Browse files Browse the repository at this point in the history
* add final for readData methods

* update pom.xml
  • Loading branch information
shuwenwei authored Dec 27, 2024
1 parent bf06a68 commit 2ee995d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,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 @@ -1889,7 +1889,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 @@ -1903,7 +1903,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
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,17 @@
<artifactId>atomix-raft</artifactId>
<version>3.1.12</version>
</exclude>
<exclude>
<groupId>ch.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.97.Final</version>
</exclude>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<!-- This was the last version to support Java 8 -->
<version>1.3.14</version>
</dependency>
</excludeCoordinates>
</banVulnerable>
</rules>
Expand Down

0 comments on commit 2ee995d

Please sign in to comment.