Skip to content

Commit

Permalink
Update release notes wrt #3647 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Oct 1, 2023
1 parent ae77a0c commit 8328baf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Project: jackson-databind
(contributed by Joo-Hyuk K)
#2787: Mix-ins do not work for `Enum`s
(fix contributed by Joo-Hyuk K)
#3647: `@JsonIgnoreProperties` not working with `@JsonValue`
(reported by @ThatSneakyRaccoon)
(fix contributed by Joo-Hyuk K)
#3780: Deprecated JsonNode.with(String) suggests using JsonNode.withObject(String)
but it is not the same thing
(reported by @bmatasar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,15 @@ protected JsonSerializer<Object> _findDynamicSerializer(SerializerProvider ctxt,
* @return Configured serializer with specified properties ignored
* @since 2.16
*/
private JsonSerializer<?> _withIgnoreProperties(SerializerProvider ctxt, JsonSerializer<?> ser) {
final AnnotationIntrospector ai = ctxt.getAnnotationIntrospector();
final SerializationConfig config = ctxt.getConfig();

JsonIgnoreProperties.Value ignorals = ai.findPropertyIgnoralByName(config, _accessor);
@SuppressWarnings("unchecked")
protected JsonSerializer<Object> _withIgnoreProperties(SerializerProvider ctxt, JsonSerializer<?> ser) {
JsonIgnoreProperties.Value ignorals = ctxt.getAnnotationIntrospector()
.findPropertyIgnoralByName(ctxt.getConfig(), _accessor);
Set<String> ignored = ignorals.findIgnoredForSerialization();
ser = ser.withIgnoredProperties(ignored);
return ser;
if (!ignored.isEmpty()) {
ser = ser.withIgnoredProperties(ignored);
}
return (JsonSerializer<Object>) ser;
}

/*
Expand Down

0 comments on commit 8328baf

Please sign in to comment.