Skip to content

Commit

Permalink
Fixed problem in StdDelegatingSerializer#serializeWithType where fi…
Browse files Browse the repository at this point in the history
…nal serializer lookup was done on the pre-converted value when `_delegateSerializer` was `null`. (#4749)
  • Loading branch information
k163377 authored Oct 14, 2024
1 parent 03de9a1 commit 80e84c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -1840,3 +1840,7 @@ Rikkarth (rikkarth@github)
Maxim Valeev (@MaximValeev)
* Reported #4508: Deserialized JsonAnySetter field in Kotlin data class is null
(2.18.1)

wrongwrong (@k163377)
* Contributed #4749: Fixed problem in StdDelegatingSerializer#serializeWithType where final serializer lookup was done
on the pre-converted value when _delegateSerializer was null
3 changes: 3 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Project: jackson-databind

2.18.1 (WIP-2024)

#4749: Fixed a problem with `StdDelegatingSerializer#serializeWithType` looking up the serializer
with the wrong argument
(fix by wrongwrong)
#4508: Deserialized JsonAnySetter field in Kotlin data class is null
(reported by @MaximValeev)
(fix by Joo-Hyuk K)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public void serializeWithType(Object value, JsonGenerator gen, SerializerProvide
}
JsonSerializer<Object> ser = _delegateSerializer;
if (ser == null) {
ser = _findSerializer(value, provider);
ser = _findSerializer(delegateValue, provider);
}
ser.serializeWithType(delegateValue, gen, provider, typeSer);
}
Expand Down

0 comments on commit 80e84c0

Please sign in to comment.