From a04dd14271fdd7f1fc88a183b3bd5d1e67d92164 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 13 Nov 2024 16:59:14 +0100 Subject: [PATCH] Drop workaround following upstream fix https://github.com/openrewrite/rewrite/commit/f50e53baafaeaee463d434be3fa1353c594d1c44 --- .../java/testing/junit5/MockitoJUnitToMockitoExtension.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/org/openrewrite/java/testing/junit5/MockitoJUnitToMockitoExtension.java b/src/main/java/org/openrewrite/java/testing/junit5/MockitoJUnitToMockitoExtension.java index 16939a286..6836be849 100644 --- a/src/main/java/org/openrewrite/java/testing/junit5/MockitoJUnitToMockitoExtension.java +++ b/src/main/java/org/openrewrite/java/testing/junit5/MockitoJUnitToMockitoExtension.java @@ -129,11 +129,6 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex maybeAddImport("org.mockito.junit.jupiter.MockitoSettings", false); maybeAddImport("org.mockito.quality.Strictness", false); } - - // Workaround first modifier incorrectly getting a trailing space as part of the prefix - cd = cd.withModifiers(ListUtils.mapFirst(cd.getModifiers(), - modifier -> modifier.withPrefix(modifier.getPrefix().withWhitespace( - modifier.getPrefix().getLastWhitespace().replaceAll(" $", ""))))); } }