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

Fixes #3144 RenamePropertyKey and ChangePropertyValue running together #3226

Merged

Conversation

ge0ffrey
Copy link
Contributor

@ge0ffrey ge0ffrey commented May 10, 2023

Without this PR (INCORRECT):
image

With this PR (CORRECT):
image

@@ -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();
Copy link
Contributor Author

@ge0ffrey ge0ffrey May 10, 2023

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).

Copy link
Contributor

@rpau rpau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment, otherwise 👍

@timtebeek timtebeek added the bug Something isn't working label May 14, 2023
@timtebeek timtebeek merged commit 0a6b55e into openrewrite:main May 14, 2023
@timtebeek
Copy link
Contributor

Thanks @ge0ffrey ! Hope this helps drive the TimeFold adoption. :)

@ge0ffrey
Copy link
Contributor Author

@timtebeek I am sure it will :) It makes upgrading easier. Thanks Tim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

RenamePropertyKey and ChangePropertyValue running together don't work as expected
3 participants