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

Make the binary reader's SpanProvider facet work with Ion 1.1 e-expressions and delimited containers #1011

Open
tgregg opened this issue Dec 10, 2024 · 0 comments

Comments

@tgregg
Copy link
Contributor

tgregg commented Dec 10, 2024

The binary SpanProvider implementation sets the current span's end index using the value marker: https://github.com/amazon-ion/ion-java/blob/master/src/main/java/com/amazon/ion/impl/IonReaderContinuableTopLevelBinary.java#L269

This works fine in Ion 1.0 because every value is length-prefixed, so the value marker's end index is always greater than or equal to its start index. However, the value markers for Ion 1.1's e-expressions and delimited containers will have end index = -1 until fully read. As currently implemented, this makes the value of OffsetSpan.getFinishOffset() garbage for these encodings. This should be fixed.

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

No branches or pull requests

1 participant