Repository navigation
Conversation
FrankChen021
left a comment
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. Closing or failing the stream releases queued response arrays and rejects subsequent chunks; blocked readers are notified, and the currently consumed chunk retains the explicitly tested behavior. The widened byte count and saturated available() result avoid integer overflow, and the guarded decrement preserves zero accounting after concurrent failure or close.
Reviewed 2 of 2 changed files, including the stream implementation and its tests, plus the surrounding HTTP response handlers and relevant consumers.
Validation: git diff --check against the prepared merge base passed. Static review only; no tests or builds were run.
This is an automated review by Codex GPT-5.6-Luna(max)
|
|
||
| Assertions.assertEquals(Integer.MAX_VALUE, in.available()); | ||
|
|
||
| in.read(new byte[oneMebibyte.length]); |
| Assertions.assertEquals(0, in.available()); | ||
| Assertions.assertEquals(5, in.read(new byte[5]), "the chunk being read is still handed out"); | ||
| Assertions.assertEquals(0, in.available()); | ||
| Assertions.assertThrows(IOException.class, () -> in.read(new byte[8192])); |
No description provided.