Skip to content
New issue

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

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

Already on GitHub? # to your account

XmlBeanSerializer serialzes AnyGetters field even with FilterExceptFilter #351

Closed
rohitnarayanan opened this issue Jul 20, 2019 · 2 comments

Comments

@rohitnarayanan
Copy link

Version: jackson-dataformat-xml-2.9.9

When using FilterExceptFilter to serialize selected fields, XmlBeanSerializer also serializes the AnyGetter field. The problem seems to be at XmlBeanSerializerBase.serializeFieldsFiltered() line: 292, where it calls _anyGetterWriter.getAndSerialize().

On the other hand YAML/JSON serialization works fine because BeanSerializerBase.serializeFieldsFiltered() line: 775, calls _anyGetterWriter.getAndFilter()

@cowtowncoder
Copy link
Member

Thank you for reporting the problem. One request: while I think I understand issue at high level, would it be possible to have a small reproduction? That makes it easier to not just fix, but verify the fix and guard against regressions?

@cowtowncoder
Copy link
Member

I went ahead and submitted what seems like a fix, and maybe a test can be added later (databind has tests which might be possible to use as base).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants