Make BsonParser tests compatible with Jackson 2.9.x
`BsonParserTest` involving ser/deser of JsonNode fails on Jackson `2.9`
Currently immutables depend on [2.8](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8) however  it should be possible to compile, test and use [2.9](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9).
Standard tests involving object binding other than `JsonNode` are working properly.
Closes
@@ -73,8 +73,12 @@ public class BsonParser extends ParserBase implements Wrapper<BsonReader> {
@Override
public String nextFieldName() throws IOException {
- if (next() == JsonToken.FIELD_NAME) {
+ final JsonToken next = next();
+ if (next == JsonToken.FIELD_NAME) {
return reader.readName();
+ } else if (next == JsonToken.START_OBJECT) {
+ // advance if container type (object)
+ return nextFieldName();
}
return null;
