Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit aa4f125

Browse files
committed
One minor fix to #52
1 parent c55b8e7 commit aa4f125

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/fasterxml/jackson/datatype/guava/deser/GuavaImmutableMapDeserializer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected T _deserializeEntries(JsonParser p, DeserializationContext ctxt)
4040
// 28-Nov-2010, tatu: Should probably support "ignorable properties" in future...
4141
Object value;
4242
if (t == JsonToken.VALUE_NULL) {
43-
_handleNull(ctxt, fieldName, _valueDeserializer, builder);
43+
_handleNull(ctxt, key, _valueDeserializer, builder);
4444
continue;
4545
}
4646
if (typeDeser == null) {
@@ -63,7 +63,7 @@ protected T _deserializeEntries(JsonParser p, DeserializationContext ctxt)
6363
* is needed; default is to simply ignore and skip such values, but alternative
6464
* could be to throw an exception.
6565
*/
66-
protected void _handleNull(DeserializationContext ctxt, String fieldName,
66+
protected void _handleNull(DeserializationContext ctxt, Object key,
6767
JsonDeserializer<?> valueDeser,
6868
ImmutableMap.Builder<Object, Object> builder) throws IOException
6969
{
@@ -73,7 +73,7 @@ protected void _handleNull(DeserializationContext ctxt, String fieldName,
7373
// Actually, first, see if there's an alternative to Java null
7474
Object nvl = valueDeser.getNullValue(ctxt);
7575
if (nvl != null) {
76-
builder.put(fieldName, nvl);
76+
builder.put(key, nvl);
7777
}
7878
}
7979
}

0 commit comments

Comments
 (0)