mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Avoid throwing arbitrary exceptions (AssertionError / AIOBE due to corrupted code), translate them to IOExceptions (EA-74073, EA-69880)
This commit is contained in:
@@ -22,7 +22,6 @@ import com.intellij.util.CompressionUtil;
|
||||
import com.intellij.util.SystemProperties;
|
||||
import com.intellij.util.containers.SLRUMap;
|
||||
import gnu.trove.TLongArrayList;
|
||||
import org.iq80.snappy.CorruptionException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.*;
|
||||
@@ -201,11 +200,13 @@ public class CompressedAppendableFile {
|
||||
} catch (IOException ignore) {}
|
||||
}
|
||||
|
||||
assert false;
|
||||
assert false:"data corruption detected:"+chunkNumber + "," + myChunkTableLength;
|
||||
return ArrayUtil.EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
catch (CorruptionException e) {
|
||||
catch (RuntimeException e) { // CorruptedException, ArrayIndexOutofBounds, etc
|
||||
throw new IOException(e);
|
||||
} catch(AssertionError ae) {
|
||||
throw new IOException(ae);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user