charliec05 opened a new pull request, #18283: URL: https://github.com/apache/iceberg/pull/18283
A negative skip on a single-buffer `ByteBufferInputStream` can move the position backwards, throw, or advance it after narrowing a large negative long to int. Return zero without changing the position, matching the InputStream contract and the existing multi-buffer implementation. Test plan: Exercise negative skips at the beginning, after a read, and at EOF for both single- and multi-buffer streams, including a long value that narrows to a positive int. Check the return value, position, and next byte. The new cases reproduce six failures before the fix; all 123 Core IO tests pass after it. Core Spotless and Checkstyle pass. --- **AI Disclosure** - Model: GPT-5 - Platform/Tool: OpenAI Codex - Human Oversight: fully reviewed (manual code review confirmed by the author). - Prompt Summary: The author set the contribution goals and constraints, approved the scope, and manually reviewed the changes. Codex generated the skip guard and regression tests and ran the validation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
