java: wrap decoder IllegalStateException as IOException

This commit is contained in:
Leo fernandes
2026-01-21 16:30:47 -03:00
parent 5fa73e23be
commit 2c214287ff

View File

@@ -169,7 +169,7 @@ public class BrotliInputStream extends InputStream {
copyLen += state.outputUsed;
copyLen = (copyLen > 0) ? copyLen : END_OF_STREAM_MARKER;
return copyLen;
} catch (BrotliRuntimeException ex) {
} catch (BrotliRuntimeException | IllegalStateException ex) {
throw new IOException("Brotli stream decoding failed", ex);
}