Skip to content
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

Don't use custom BeanPropertyWriter for xml module #7170

Merged
merged 2 commits into from Apr 5, 2022
Merged

Don't use custom BeanPropertyWriter for xml module #7170

merged 2 commits into from Apr 5, 2022

Commits on Mar 31, 2022

  1. Don't use custom BeanPropertyWriter for xml module

    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
    yawkat committed Mar 31, 2022
    Copy the full SHA
    1c4d547 View commit details
    Browse the repository at this point in the history
  2. Merge branch '3.4.x' into xml-bim

    # Conflicts:
    #	jackson-databind/src/test/groovy/io/micronaut/jackson/modules/BeanIntrospectionModuleSpec.groovy
    yawkat committed Mar 31, 2022
    Copy the full SHA
    d380bd4 View commit details
    Browse the repository at this point in the history