Open
Description
Describe the bug
The filter method only get called once if the field value is NULL
,
when using @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = SomeFieldFilter.class)
Version information
2.12.6.1
To Reproduce
- create an HTTP get endpoint to return an instance of
ObjectDto
which has aNULL
value forfieldDto
:
public class ObjectDto {
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = SomeFieldFilter.class)
private FieldDto fieldDto;
}
-
Send requests to the endpoint.
The first time, theequals()
method ofSomeFieldFilter
is called during the serialization.
The same method never get called for the HTTP requests after. -
For instances that have a
non-NULL
value forfieldDto
, theequals()
method of SomeFieldFilter` gets called all the time during the serialization
Expected behavior
For instances that have a NULL
value for fieldDto
, the equals()
method of SomeFieldFilter
also gets called all the time during the serialization
Additional context
N/A
Metadata
Metadata
Assignees
Labels
No labels