Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensures that the binary reader can handle a ByteArrayInputStream that returns a negative number from available(). #625

Merged
merged 5 commits into from
Nov 3, 2023

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Oct 25, 2023

Description of changes:
Surprisingly, ByteArrayInputStream.available() can return a negative number. This causes problems when the cursor tries to select a fixed-size buffer configuration. This PR fixes the problem by ensuring that the size 0 configuration is used in this case.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tgregg tgregg force-pushed the handle-throttled-inputstream branch from cf6ef90 to 72c1962 Compare October 27, 2023 17:42
… returns a negative number from available().
@tgregg tgregg force-pushed the handle-throttled-inputstream branch from 72c1962 to 884ae15 Compare November 2, 2023 23:48
Base automatically changed from handle-throttled-inputstream to master November 3, 2023 00:23
Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/com/amazon/ion/impl/IonCursorBinary.java 86.51% <100.00%> (ø)
...mazon/ion/impl/IonReaderContinuableCoreBinary.java 85.43% <80.00%> (+0.33%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@tgregg tgregg merged commit 8df9b7d into master Nov 3, 2023
16 of 33 checks passed
@tgregg tgregg deleted the empty-bais branch November 3, 2023 00:38
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.

2 participants