Migrate com.sun.xml.bind.marshaller.NamespacePrefixMapper to org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper#1121
Open
Jenson3210 wants to merge 1 commit into
Open
Conversation
…lassfish.jaxb.runtime.marshaller.NamespacePrefixMapper` The JAXB RI relocated `NamespacePrefixMapper` as part of the 2.x→3.x repackaging that accompanies the `javax.xml.bind` → `jakarta.xml.bind` move. Wire a declarative `ChangeType` into `JavaxXmlBindMigrationToJakartaXmlBind` so subclasses migrate alongside the rest of the Jakarta XML Binding 3.0 wave. Refs: moderneinc/customer-requests#2462 (item 8)
com.sun.xml.bind.marshaller.NamespacePrefixMapper to org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The JAXB RI relocated
com.sun.xml.bind.marshaller.NamespacePrefixMappertoorg.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapperas part of the 2.x → 3.x repackaging that accompanies thejavax.xml.bind→jakarta.xml.bindmove. SubclassingNamespacePrefixMapperis a common pattern for controlling XML namespace prefixes during marshalling, and these references were not being rewritten by any existing recipe.Wires a declarative
ChangeTypeintoJavaxXmlBindMigrationToJakartaXmlBind(injakarta-ee-9.yml), placed alongside the existingjavax.xml.bind→jakarta.xml.bindChangePackageandcom.sun.xml.bind:jaxb-impl→org.glassfish.jaxb:jaxb-runtimedependency change, so the type rename rides along with the rest of the Jakarta XML Binding 3.0 wave.ignoreDefinition: trueis required since the old type is not on the classpath of the project being migrated; it's referenced via FQN by user code.Addresses item 8 of moderneinc/customer-requests#2462.
Test plan
migrateNamespacePrefixMappertoJavaxXmlBindMigrationToJakartaXmlBindTestwith stubs for both old and new types, asserting the import +extendsreference are rewritten on a subclass../gradlew test --tests JavaxXmlBindMigrationToJakartaXmlBindTest— BUILD SUCCESSFUL.