mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-27 07:54:17 +02:00
Remove the problematic catch of OOM. (#647)
This commit is contained in:
parent
626b4dd765
commit
7c8a57108e
@ -448,13 +448,8 @@ public class SnappyInputStream
|
|||||||
// extend the compressed data buffer size
|
// extend the compressed data buffer size
|
||||||
if (compressed == null || chunkSize > compressed.length) {
|
if (compressed == null || chunkSize > compressed.length) {
|
||||||
// chunkSize exceeds limit
|
// chunkSize exceeds limit
|
||||||
try {
|
|
||||||
compressed = new byte[chunkSize];
|
compressed = new byte[chunkSize];
|
||||||
}
|
}
|
||||||
catch (java.lang.OutOfMemoryError e) {
|
|
||||||
throw new SnappyError(SnappyErrorCode.INVALID_CHUNK_SIZE, e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
readBytes = 0;
|
readBytes = 0;
|
||||||
while (readBytes < chunkSize) {
|
while (readBytes < chunkSize) {
|
||||||
int ret = in.read(compressed, readBytes, chunkSize - readBytes);
|
int ret = in.read(compressed, readBytes, chunkSize - readBytes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user