Skip to content

Commit 135ca6d

Browse files
committed
end index validation in MemoryStore
1 parent a6512de commit 135ca6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/dev/zarr/zarrjava/store/MemoryStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public ByteBuffer get(String[] keys, long start, long end) {
4444
byte[] bytes = map.get(resolveKeys(keys));
4545
if (bytes == null) return null;
4646
if (end < 0) end = bytes.length;
47-
if (end > Integer.MAX_VALUE) throw new RuntimeException("TODO"); //TODO
47+
if (end > Integer.MAX_VALUE) throw new IllegalArgumentException("End index too large");
4848
return ByteBuffer.wrap(bytes, (int) start, (int) end);
4949
}
5050

0 commit comments

Comments
 (0)