Skip to content

Jackson reports wrong locations for JsonEOFException #455

@wastevenson

Description

@wastevenson

I noticed the the locations reported for JsonEOFException are wrong for both InputStream and Reader based parsers. The values are about 2x higher than they should be. It looks like the problem is that in _loadMore for UTF8StreamJsonParser and in ReaderBasedJsonParser the value for _currInputRowStart is adjusted even if the read fails but _inputPtr is set to 0 only if the read succeeds. When the location is calculated for the exception the count from the last buffer is included in both from _inputPtr and in _currInputRowStart doubling the value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions