Skip to content

Commit 7c8a571

Browse files
authored
Remove the problematic catch of OOM. (#647)
1 parent 626b4dd commit 7c8a571

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/org/xerial/snappy/SnappyInputStream.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,7 @@ protected boolean hasNextChunk()
448448
// extend the compressed data buffer size
449449
if (compressed == null || chunkSize > compressed.length) {
450450
// chunkSize exceeds limit
451-
try {
452-
compressed = new byte[chunkSize];
453-
}
454-
catch (java.lang.OutOfMemoryError e) {
455-
throw new SnappyError(SnappyErrorCode.INVALID_CHUNK_SIZE, e.getMessage());
456-
}
451+
compressed = new byte[chunkSize];
457452
}
458453
readBytes = 0;
459454
while (readBytes < chunkSize) {

0 commit comments

Comments
 (0)