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

Commit e46c441

Browse files
committed
Merge pull request #52 from josethomas/master
Guava collection types do not allow null values
2 parents 2781061 + 2eed9b5 commit e46c441

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ protected T _deserializeEntries(JsonParser jp, DeserializationContext ctxt) thro
4545
} else {
4646
value = valueDes.deserializeWithType(jp, ctxt, typeDeser);
4747
}
48-
builder.put(key, value);
48+
if (null != value) {
49+
builder.put(key, value);
50+
}
4951
}
5052
// No class outside of the package will be able to subclass us,
5153
// and we provide the proper builder for the subclasses we implement.
@@ -54,4 +56,4 @@ protected T _deserializeEntries(JsonParser jp, DeserializationContext ctxt) thro
5456
return map;
5557
}
5658

57-
}
59+
}

0 commit comments

Comments
 (0)