Skip to content

Conversation

@timtebeek
Copy link
Member

What's changed?

Added an additional ChangeMethodName and unit test to PreferJavaUtilPredicate.

What's your motivation?

Fixes #435

Anything in particular you'd like reviewers to focus on?

ChangeMethodName for now ignores the NewClass, instead looking for ClassDeclaration when trying to match the method pattern supplied, which therefor mismatches and fails to do the required replacement. This should probably be fixed upstream in rewrite-java.

Have you considered any alternatives or workarounds?

We could add a dedicated recipe here for that replacement, but then any similar such change would need the same. It'd be easier if ChangeMethodName supported this out of the box, especially when using matchOverrides.

Any additional context

@timtebeek timtebeek self-assigned this May 6, 2024
@timtebeek timtebeek added the bug Something isn't working label May 6, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@timtebeek
Copy link
Member Author

@timtebeek timtebeek marked this pull request as ready for review May 6, 2024 16:34
@timtebeek timtebeek merged commit 3897b37 into main May 6, 2024
@timtebeek timtebeek deleted the change-guava-predicate-method-name branch May 6, 2024 17:11
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.

PreferJavaUtilPredicate does not change functional method {apply -> test}

2 participants