Closed BhavanaPidapa closed 1 week ago
Doesn't this overlap with this existing recipe? https://github.com/openrewrite/rewrite-migrate-java/blob/86bc2b56109aa64eb68d23c31d7565821f7ab468/src/main/java/org/openrewrite/java/migrate/UseJavaUtilBase64.java#L63-L72
Doesn't this overlap with this existing recipe?
Great find. The recipes do appear to overlap. We can opt for the suggestion mentioned in UseJavaUtilBase64.java instead
@BhavanaPidapa feel free to close this PR when you are ready
With the existing custom recipe, I have tested all the test cases and results are as expected. So, I am closing this PR.
What's changed?
This recipe deals with a part of this rule
What's your motivation?
I used org.openrewrite.java.ChangeType for the recipe RemovedSunAPIs
Anyone you would like to review specifically?
@cjobinabo @timtebeek
Have you considered any alternatives or workarounds?
Since it was not possible to test the recipe. I created sample files, created a local plugin using ./gradlew publishToMavenLocal then ran it in the Java8 Sample App using mvn rewrite:dryRun
Attaching the rewrite.patch file rewrite.patch
Any additional context
This recipe covers only
The sun.* APIs are unsupported, JDK-internal APIs, and may go away at any time. The sun.misc.BASE64Encoder and sun.misc.BASE64Decoder have been removed in Java SE 11. Instead, use the supported java.util.Base64 class, which was added in Java SE 8.
part of the rule.Checklist