Skip to content

Commit

Permalink
Revert Base64::getEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Aug 7, 2023
1 parent b69dda5 commit 057423e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public J visitNewClass(J.NewClass newClass, ExecutionContext ctx) {
J.NewClass c = (J.NewClass) super.visitNewClass(newClass, ctx);
if (newBase64Encoder.matches(c)) {
// noinspection Convert2MethodRef
return JavaTemplate.compile(this, "getEncoder", Base64::getEncoder)
return JavaTemplate.compile(this, "getEncoder", () -> Base64.getEncoder())
.build()
.apply(updateCursor(c), c.getCoordinates().replace());
} else if (newBase64Decoder.matches(c)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import static org.openrewrite.java.Assertions.java;

public class UseJavaUtilBase64Test implements RewriteTest {
class UseJavaUtilBase64Test implements RewriteTest {

@Override
public void defaults(RecipeSpec spec) {
Expand Down

0 comments on commit 057423e

Please sign in to comment.