Protobuf parser state handling wrong for implicit close (END_OBJECT) (original) (raw)

When ProtobufParser reaches end of input at top level, it will both:

  1. Report JsonToken.END_OBJECT to close root level implicit Object value
  2. Call JsonParser.close() to close input

While this works in many ways (current token properly set; further JsonParser.nextToken() calls will return null), it will not work wrt FasterXML/jackson-core#1438 .
Ideally we would probably add one more state (STATE_ROOT_END?) to cover this case.