-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fixes #3144 RenamePropertyKey and ChangePropertyValue running together #3226
Fixes #3144 RenamePropertyKey and ChangePropertyValue running together #3226
Conversation
…ing together don't work as expected
@@ -73,6 +73,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext ctx) { | |||
Xml.Tag t = super.visitTag(tag, ctx); | |||
if (isPropertyTag() && oldKey.equals(t.getName())) { | |||
t = t.withName(newKey); | |||
maybeUpdateModel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that adding this change fixes the issue, by using local SNAPSHOT builds (and without it, the issue reproduces). See screenshots above.
But... the test below seems to NOT fail if this line isn't there (TDD:it should fail if the test environment matches a real environment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, otherwise 👍
rewrite-maven/src/test/java/org/openrewrite/maven/RenamePropertyKeyTest.java
Outdated
Show resolved
Hide resolved
rewrite-maven/src/test/java/org/openrewrite/maven/RenamePropertyKeyTest.java
Outdated
Show resolved
Hide resolved
Thanks @ge0ffrey ! Hope this helps drive the TimeFold adoption. :) |
@timtebeek I am sure it will :) It makes upgrading easier. Thanks Tim! |
Without this PR (INCORRECT):
With this PR (CORRECT):