openrewrite / openrewrite/rewrite
Refactor JAXB out
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 570
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Description
This repo currently uses com.fasterxml.jackson.module:jackson-module-jaxb-annotations, which is based on the pre-jakarta javax XML bind annotations. Pretty old.
Doing some searches, the blast radius is small:
https://github.com/search?q=repo%3Aopenrewrite%2Frewrite+jaxb&type=code
https://github.com/search?q=repo%3Aopenrewrite%2Frewrite+%22javax.xml.bind%22&type=code
Our MavenXmlMapper applies the JaxbAnnotationModule to its writeMapper, and not its readMapper, and the javax.xml.bind.annotation.XmlRootElement annotation is used in RawGradleModule and RawPom. Jackson has a native JacksonXmlRootElement replacement for that annotation, which should be an easy swap.
But even better, Claude and I suspect all this jaxb stuff is dead code anyway -- we only register the module on the write mapper, and those two classes are only deserialized, never serialized.
I think all this can be deleted?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting MavenXmlMapper and the JAXB annotations and usages in RawGradleModule and RawPom. Check whether the writeMapper registration and annotations are exercised, then run the existing test suite. Done means the obsolete JAXB dependency, module registration, and unused annotations are removed or replaced without breaking XML mapping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100