Skip to content

IonFactory.createParser(IonReader) does not initialize state #436

Description

@cowtowncoder

(note: issue uncovered when working on fix for #434)

It looks like following method in IonFactory

    public IonParser createParser(IonReader in) {
        ...
    }

does not initialize state according to current state of IonReader. This is fine for the common case of newly constructed IonReader (which does not point to anything); but does not work as expected in case IonReader has been advanced to point to a token. This seems like a flaw and there is at least one unit test that appears to expect this to work: test in question has been working due to many methods in IonParser not verifying current token and getting information directly from IonReader.
But this will be problematic when checking for, say, IonParser.currentToken() since Jackson streaming level state information is not properly set up.

Ideally, current token and other settings would be properly initialized.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions