Skip to content

Conversation

@leofernandesmo
Copy link

  • Problem: Decode.decompress(state) may throw IllegalStateException via Utils.makeError (e.g. "Brotli error code: -22").
    BrotliInputStream.read(...) currently wraps only BrotliRuntimeException, so this decoder failure escapes as an
    unchecked exception.

  • Fix: Wrap IllegalStateException from the decoder as IOException, consistent with existing handling of BrotliRuntimeException.

  • Impact: Only affects invalid/corrupted streams (error path). No behavior change for valid inputs.

  • Repro (example):

BrotliInputStream.read(...) -> Decode.decompress(...) -> Utils.makeError(...) throws IllegalStateException("Brotli error code: -22")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant