Skip to content

Commit 2cfd80e

Browse files
committed
Tighter bound
1 parent f9ccb5f commit 2cfd80e

File tree

1 file changed

+1
-1
lines changed
  • x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/cache

1 file changed

+1
-1
lines changed

x-pack/plugin/searchable-snapshots/src/test/java/org/elasticsearch/index/store/cache/TestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public InputStream readBlob(String name, long position, long length) throws IOEx
9595
if (name.startsWith(prefix) == false) {
9696
throw new FileNotFoundException("Blob not found: " + name);
9797
}
98-
assert position + length <= blobContent.length
98+
assert position + length <= partSize
9999
: "cannot read [" + position + "-" + (position + length) + "] from array part of length [" + partSize + "]";
100100
final int partNumber = Integer.parseInt(name.substring(prefix.length()));
101101
final int positionInBlob = Math.toIntExact(position) + partSize * partNumber;

0 commit comments

Comments
 (0)