diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/AtomicBooleanDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/AtomicBooleanDeserializer.java index ee301e5beb..f1862d211b 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/AtomicBooleanDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/AtomicBooleanDeserializer.java @@ -24,7 +24,7 @@ public AtomicBoolean deserialize(JsonParser p, DeserializationContext ctxt) thro } // 12-Jun-2020, tatu: May look convoluted, but need to work correctly with // CoercionConfig - Boolean b = _parseBoolean(ctxt, p, AtomicBoolean.class); + Boolean b = _parseBoolean(p, ctxt, AtomicBoolean.class); return (b == null) ? null : new AtomicBoolean(b.booleanValue()); } diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java index bab0ab34b7..ff0d0657bc 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/NumberDeserializers.java @@ -209,9 +209,9 @@ public Boolean deserialize(JsonParser p, DeserializationContext ctxt) throws IOE return Boolean.FALSE; } if (_primitive) { - return _parseBooleanPrimitive(ctxt, p); + return _parseBooleanPrimitive(p, ctxt); } - return _parseBoolean(ctxt, p, _valueClass); + return _parseBoolean(p, ctxt, _valueClass); } // Since we can never have type info ("natural type"; String, Boolean, Integer, Double): @@ -229,9 +229,9 @@ public Boolean deserializeWithType(JsonParser p, DeserializationContext ctxt, return Boolean.FALSE; } if (_primitive) { - return _parseBooleanPrimitive(ctxt, p); + return _parseBooleanPrimitive(p, ctxt); } - return _parseBoolean(ctxt, p, _valueClass); + return _parseBoolean(p, ctxt, _valueClass); } } diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java index 02d4235e82..2a2131b741 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.java @@ -378,7 +378,7 @@ public boolean[] deserialize(JsonParser p, DeserializationContext ctxt) _verifyNullForPrimitive(ctxt); value = false; } else { - value = _parseBooleanPrimitive(ctxt, p); + value = _parseBooleanPrimitive(p, ctxt); } if (ix >= chunk.length) { chunk = builder.appendCompletedChunk(chunk, ix); @@ -395,7 +395,7 @@ public boolean[] deserialize(JsonParser p, DeserializationContext ctxt) @Override protected boolean[] handleSingleElementUnwrapped(JsonParser p, DeserializationContext ctxt) throws IOException { - return new boolean[] { _parseBooleanPrimitive(ctxt, p) }; + return new boolean[] { _parseBooleanPrimitive(p, ctxt) }; } @Override diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java index 1d5614f6aa..b741d4da59 100644 --- a/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java @@ -309,9 +309,8 @@ protected T _deserializeWrappedValue(JsonParser p, DeserializationContext ctxt) * (may be {@code boolean[]} or {@code AtomicBoolean} for example); * used for coercion config access */ - protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, - JsonParser p) - throws IOException + protected final boolean _parseBooleanPrimitive(JsonParser p, DeserializationContext ctxt) + throws IOException { final JsonToken t = p.currentToken(); // usually caller should have handled but: @@ -360,7 +359,7 @@ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, // 12-Jun-2020, tatu: For some reason calling `_deserializeFromArray()` won't work so: if (t == JsonToken.START_ARRAY && ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) { p.nextToken(); - final boolean parsed = _parseBooleanPrimitive(ctxt, p); + final boolean parsed = _parseBooleanPrimitive(p, ctxt); _verifyEndArrayForSingle(p, ctxt); return parsed; } @@ -377,16 +376,16 @@ protected final boolean _parseBooleanPrimitive(DeserializationContext ctxt, * Caller may need to translate from 3 possible result types into appropriately * matching output types. * - * @param ctxt Deserialization context for accessing configuration * @param p Underlying parser + * @param ctxt Deserialization context for accessing configuration * @param targetType Actual type that is being deserialized, may be * same as {@link #handledType} but could be {@code AtomicBoolean} for example. * Used for coercion config access. * * @since 2.12 */ - protected final Boolean _parseBoolean(DeserializationContext ctxt, - JsonParser p, Class targetType) + protected final Boolean _parseBoolean(JsonParser p, DeserializationContext ctxt, + Class targetType) throws IOException { switch (p.currentTokenId()) {