11package tools .jackson .databind .deser ;
22
3+ import java .lang .reflect .Modifier ;
34import java .util .*;
45
56import com .fasterxml .jackson .annotation .*;
@@ -938,19 +939,16 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
938939 JavaType type = resolveMemberAndTypeAnnotations (ctxt , mutator , propType0 );
939940 // Does the Method specify the deserializer to use? If so, let's use it.
940941 TypeDeserializer typeDeser = (TypeDeserializer ) type .getTypeHandler ();
941- SettableBeanProperty prop ;
942- if (mutator instanceof AnnotatedMethod ) {
943- prop = new MethodProperty (propDef , type , typeDeser ,
944- beanDescRef .getClassAnnotations (), (AnnotatedMethod ) mutator );
945- } else {
946- // 08-Sep-2016, tatu: wonder if we should verify it is `AnnotatedField` to be safe?
947- prop = new FieldProperty (propDef , type , typeDeser ,
948- beanDescRef .getClassAnnotations (), (AnnotatedField ) mutator );
942+ // 05-May-2025, tatu: [databind#5090]/[databind#2083] Need to skip these for some reason
943+ if (isFinalField (mutator )) {
944+ return null ;
949945 }
950946 ValueDeserializer <?> deser = findDeserializerFromAnnotation (ctxt , mutator );
951947 if (deser == null ) {
952948 deser = (ValueDeserializer <?>) type .getValueHandler ();
953949 }
950+ SettableBeanProperty prop = new MethodProperty (propDef , type , typeDeser ,
951+ beanDescRef .getClassAnnotations (), mutator );
954952 if (deser != null ) {
955953 deser = ctxt .handlePrimaryContextualization (deser , prop , type );
956954 prop = prop .withValueDeserializer (deser );
@@ -967,6 +965,11 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
967965 return prop ;
968966 }
969967
968+ private boolean isFinalField (AnnotatedMember am ) {
969+ return am instanceof AnnotatedField
970+ && Modifier .isFinal (am .getMember ().getModifiers ());
971+ }
972+
970973 /**
971974 * Method that will construct a regular bean property setter using
972975 * the given setter method.
0 commit comments