Skip to content

Commit ff9ff99

Browse files
committed
end index validation in MemoryStore
1 parent bce731e commit ff9ff99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)