Remove the problematic catch of OOM. (#647)

This commit is contained in:
Duong Nguyen 2025-07-19 11:31:38 -07:00 committed by GitHub
parent 626b4dd765
commit 7c8a57108e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -448,12 +448,7 @@ public class SnappyInputStream
// extend the compressed data buffer size
if (compressed == null || chunkSize > compressed.length) {
// chunkSize exceeds limit
try {
compressed = new byte[chunkSize];
}
catch (java.lang.OutOfMemoryError e) {
throw new SnappyError(SnappyErrorCode.INVALID_CHUNK_SIZE, e.getMessage());
}
compressed = new byte[chunkSize];
}
readBytes = 0;
while (readBytes < chunkSize) {