From 08012cbed017a2e4fdce2cfdadbd65d5c2be108c Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 8 Jun 2024 18:27:52 +0100 Subject: [PATCH] handle case when token is set to null --- .../java/com/fasterxml/jackson/core/base/ParserMinimalBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/fasterxml/jackson/core/base/ParserMinimalBase.java b/src/main/java/com/fasterxml/jackson/core/base/ParserMinimalBase.java index f7d82ff919..8805697f23 100644 --- a/src/main/java/com/fasterxml/jackson/core/base/ParserMinimalBase.java +++ b/src/main/java/com/fasterxml/jackson/core/base/ParserMinimalBase.java @@ -791,7 +791,7 @@ protected final void _wrapError(String msg, Throwable t) throws JsonParseExcepti protected final JsonToken _updateToken(final JsonToken token) { _currToken = token; - if (token != JsonToken.NOT_AVAILABLE) { + if (token != null && token != JsonToken.NOT_AVAILABLE) { ++_tokenCount; } return token;