Remove wrong namespace-change of package javax.transaction.xa #554
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.
This change removes a wrongly made namespace-change of a package in jakarta-ee-9.yml.
Previously, the package
javax.transaction.xa
(from Java SE 8) was wrongly changed tojakarta.transaction.xa
, which does not exist because it did not change.This was probably done because the namespace change did affect all sub-packages for other packages of javax.* namespace. With
javax.transaction
however, there is only this single package in Jakarta EE which has change tojakarta.transaction
. The namespace of the packagejavax.transaction.xa
(from Java SE 8) did not change though, which is why my solution would be to just turn the recursive attribute to 'false'.What's changed?
Changed the value of the recursive attribute in the recipe org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction from
true
tofalse
and added a testclass.What's your motivation?
Months ago I was mentioning this bug in slack here and I forgot to make the MR until now.
Anything in particular you'd like reviewers to focus on?
There is only this single package that has been renamed from javax.transaction to jakarta.transaction as shown here, so i don't think we need the recursive change, especially if it causes unwanted side-effects.
Anyone you would like to review specifically?
I was talking with @timtebeek on slack, so he would probably be the best here.
Have you considered any alternatives or workarounds?
As @timtebeek suggested, I could have excluded the
javax.transaction.xa
namespace, but I think my solution is more simple. I am open to discussion though :)Checklist