Skip to content

Commit 326535b

Browse files
committed
apply fix from FasterXML#5964
1 parent ec06588 commit 326535b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,10 @@ public JsonDeserializer<?> createContextual(DeserializationContext ctxt,
894894
// 16-May-2016, tatu: How about per-property case-insensitivity?
895895
Boolean B = format.getFeature(JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES);
896896
if (B != null) {
897-
BeanPropertyMap propsOrig = _beanProperties;
897+
// [databind#5962]: must rebuild from the (possibly filtered) contextual
898+
// BeanPropertyMap so that per-property @JsonIgnoreProperties exclusions
899+
// applied by _handleByNameInclusion() above are preserved.
900+
BeanPropertyMap propsOrig = contextual._beanProperties;
898901
BeanPropertyMap props = propsOrig.withCaseInsensitivity(B.booleanValue());
899902
if (props != propsOrig) {
900903
contextual = contextual.withBeanProperties(props);

0 commit comments

Comments
 (0)