From 8b0ca0b980f68d9868229db752032c6bb3a52262 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 28 Dec 2020 14:27:56 -0800 Subject: [PATCH] One more minor improvement to exception for #2977 --- .../jackson/databind/deser/std/NumberDeserializers.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 1ce3aec218..8b40dc4f97 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 @@ -14,6 +14,7 @@ import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; import com.fasterxml.jackson.databind.type.LogicalType; import com.fasterxml.jackson.databind.util.AccessPattern; +import com.fasterxml.jackson.databind.util.ClassUtil; /** * Container class for deserializers that handle core JDK primitive @@ -174,7 +175,7 @@ public final T getNullValue(DeserializationContext ctxt) throws JsonMappingExcep if (_primitive && ctxt.isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)) { ctxt.reportInputMismatch(this, "Cannot map `null` into type %s (set DeserializationConfig.DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES to 'false' to allow)", - handledType().toString()); + ClassUtil.classNameOf(handledType())); } return _nullValue; }