Skip to content

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

Open
@tgregg

Description

@tgregg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions