Skip to content

Commit b960382

Browse files
Re-enable setting of final instance fields (#5150)
Followup to #5090
1 parent 911916c commit b960382

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/main/java/tools/jackson/databind/deser/BeanDeserializerFactory.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -939,10 +939,6 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
939939
JavaType type = resolveMemberAndTypeAnnotations(ctxt, mutator, propType0);
940940
// Does the Method specify the deserializer to use? If so, let's use it.
941941
TypeDeserializer typeDeser = (TypeDeserializer) type.getTypeHandler();
942-
// 05-May-2025, tatu: [databind#5090]/[databind#2083] Need to skip these for some reason
943-
if (isFinalField(mutator)) {
944-
return null;
945-
}
946942
ValueDeserializer<?> deser = findDeserializerFromAnnotation(ctxt, mutator);
947943
if (deser == null) {
948944
deser = (ValueDeserializer<?>) type.getValueHandler();
@@ -965,11 +961,6 @@ protected SettableBeanProperty constructSettableProperty(DeserializationContext
965961
return prop;
966962
}
967963

968-
private boolean isFinalField(AnnotatedMember am) {
969-
return am instanceof AnnotatedField
970-
&& Modifier.isFinal(am.getMember().getModifiers());
971-
}
972-
973964
/**
974965
* Method that will construct a regular bean property setter using
975966
* the given setter method.

0 commit comments

Comments
 (0)