Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't use custom BeanPropertyWriter for xml module (#7170)
Our BeanIntrospectionPropertyWriter is fundamentally incompatible with the XmlBeanPropertyWriter. This patch skips use of our writer if the xml writer is present, to preserve the proper xml serialization behavior. The biggest disadvantage to this approach is that it only works if reflection is available. There also isn't the perf improvement of BeanIntrospectionPropertyWriter. An alternative here would be to add support for the XML features to the BeanIntrospectionModule. I tried a limited version of this (only the features directly supported by the XmlBeanPropertyWriter), and it works, but only with reflection available. So the native-image issue remains unresolved even with the limited xml support. Full XML support without reflection would basically need a reimpl of big parts of jackson-dataformat-xml, which is certainly out of scope for micronaut-jackson-databind, though it could be a future feature of micronaut-xml. Fixes #5907
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters