Skip to content

Remove _anyGetterWriter extended usage #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ protected BeanSerializerBase asArraySerializer()
* - have any getter
*/
if ((_objectIdWriter == null)
&& (_anyGetterWriter == null)
&& (_propertyFilterId == null)
) {
return new BeanAsArraySerializer(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,6 @@ protected void serializeFields(Object bean, JsonGenerator gen0, SerializerProvid
xgen.setNextIsUnwrapped(false);
}
}
if (_anyGetterWriter != null) {
// For [#117]: not a clean fix, but with @JsonTypeInfo, we'll end up
// with accidental attributes otherwise
xgen.setNextIsAttribute(false);
_anyGetterWriter.getAndSerialize(bean, xgen, provider);
}
} catch (Exception e) {
String name = (i == props.length) ? "[anySetter]" : props[i].getName();
wrapAndThrow(provider, e, bean, name);
Expand Down Expand Up @@ -300,13 +294,6 @@ protected void serializeFieldsFiltered(Object bean, JsonGenerator gen0,
xgen.setNextIsUnwrapped(false);
}
}
if (_anyGetterWriter != null) {
// For [#117]: not a clean fix, but with @JsonTypeInfo, we'll end up
// with accidental attributes otherwise
xgen.setNextIsAttribute(false);
// 24-Jul-2019, tatu: Fixed for [dataformat-xml#351]
_anyGetterWriter.getAndFilter(bean, xgen, provider, filter);
}
} catch (Exception e) {
String name = (i == props.length) ? "[anySetter]" : props[i].getName();
wrapAndThrow(provider, e, bean, name);
Expand Down