-
Notifications
You must be signed in to change notification settings - Fork 502
Closed as not planned
Labels
questionFurther information is requestedFurther information is requested
Description
What problem are you trying to solve?
Certain API got deprecated in favor of something new. There is a replacement, and we need to define the rules on how old, deprecated API calls are transitioned into a new call, that is open to discussion
What precondition(s) should be checked before applying this recipe?
We have calls to an old API. The old API produces the type A. The old API produces also either the type A, or any of its children. So it is backward compatible on the source code level. But the input parameters are either changed, or more qualified, or re-arranged or etc.
Describe the situation before applying the recipe
class A {
void foo(String a, String b) {
bar(a, b);
}
/**
* @deprecated in favor of #bar(Integer, Boolean)
*/
@Deprecated
void bar(Integer int, String value) {
}
void bar(Integer int, Boolean value) {
}
}Describe the situation after applying the recipe
class A {
void foo(String a, String b) {
bar(a, Boolean.valueOf(b));
}
/**
* @deprecated in favor of #bar(Integer, Boolean)
*/
@Deprecated
void bar(Integer int, String value) {
}
void bar(Integer int, Boolean value) {
}
}Have you considered any alternatives or workarounds?
Based on documentation, there are no workarounds to this in openrewrite, yet.
Any additional context
Are you interested in contributing this recipe to OpenRewrite?
Yes, I would like to
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
Type
Projects
Status
Done