Skip to content

Commit

Permalink
Reduce field accesses again
Browse files Browse the repository at this point in the history
  • Loading branch information
romseygeek committed Oct 31, 2023
1 parent 3bcd3db commit e131c05
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,11 @@ public boolean tryRead(ByteBuffer buf, long offset) throws IOException {
} else {
fileRegion = cache.get(cacheKey, length, startRegion);
}
final var region = fileRegion;
if (region.chunk.tracker.checkAvailable(end - getRegionStart(startRegion)) == false) {
final var region = fileRegion.chunk;
if (region.tracker.checkAvailable(end - getRegionStart(startRegion)) == false) {
return false;
}
boolean res = region.chunk.tryRead(buf, offset);
boolean res = region.tryRead(buf, offset);
lastAccessedRegion = res ? fileRegion : null;
return res;
}
Expand Down

0 comments on commit e131c05

Please sign in to comment.