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.
What's changed?
Added an additional
ChangeMethodName
and unit test toPreferJavaUtilPredicate
.What's your motivation?
Fixes #435
Anything in particular you'd like reviewers to focus on?
ChangeMethodName
for now ignores theNewClass
, instead looking forClassDeclaration
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 usingmatchOverrides
.Any additional context
435