I'm having issues deserializing with the following code:
TokenBuffer tokenBuffer = new TokenBuffer(jp);
JsonParser jp2 = tokenBuffer.asParser();
jp2.nextToken();
JsonToken nextToken = jp2.nextToken();
if (nextToken == JsonToken.START_OBJECT) {
return;
}
if (nextToken == JsonToken.END_OBJECT) {
return;
}
if (jp2.currentName().equals("type")) {
jp2.nextToken();
attributeValueType = jp2.getValueAsString();
break;
}
This line gives a Null pointer:
if (jp2.currentName().equals("type")) {
And this returns null:
jp2.nextToken();
And this doesn't:
jp.nextToken();
When I do the same functions on jp
(so not creating jp2
),everything is fine.
When I switch back to Java 8, everything is fine.
Could Java 17 break the Jackson lib?
Any help is appreciated!