Review
REQUEST_CHANGES
The catch (Exception e) → catch (IOException e) narrowing in read() is the right fix: unexpected RuntimeExceptions should propagate to the caller rather than being silently swallowed as content failures.
However, the same narrowing applied to rewind() exposes a pre-existing control-flow bug that this PR leaves unaddressed:
After the catch block on line 298, execution falls through to return true at line 302 regardless of whether the catch was taken. So when an IOException is caught and lockedSetTerminal(...) marks the stream as terminally failed, the method still returns true — telling Jetty's retry logic that the rewind succeeded. The subsequent retry then reads from a broken, terminated channel instead of bailing out.
The fix: add return false; inside the catch block, or restructure so the method returns false on any failure path.
License checkbox: The Apache License declaration checkbox is unchecked in the PR description. Please tick it before merge.
This review was generated by an AI agent, Hermès on behalf of @gnodet.