Skip to content

Commit d69d468

Browse files
committed
Overeager assertion
1 parent 2cfd80e commit d69d468

File tree

1 file changed

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

1 file changed

+0
-2
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ public InputStream readBlob(String name, long position, long length) throws IOEx
7676
if (blobName.equals(name) == false) {
7777
throw new FileNotFoundException("Blob not found: " + name);
7878
}
79-
assert position + length <= blobContent.length
80-
: "cannot read [" + position + "-" + (position + length) + "] from array of length [" + blobContent.length + "]";
8179
return Streams.limitStream(new ByteArrayInputStream(blobContent, Math.toIntExact(position),
8280
blobContent.length - Math.toIntExact(position)), length);
8381
}

0 commit comments

Comments
 (0)