From 40df9470de9cb6337aff793271a3c4a4274e6a2c Mon Sep 17 00:00:00 2001 From: Lukas Poos Date: Fri, 9 Jun 2023 14:21:50 +0200 Subject: [PATCH] #3156: Add JavaParser to JavaTemplate --- .../src/main/java/org/openrewrite/java/LombokUtilityClass.java | 1 + 1 file changed, 1 insertion(+) diff --git a/rewrite-java/src/main/java/org/openrewrite/java/LombokUtilityClass.java b/rewrite-java/src/main/java/org/openrewrite/java/LombokUtilityClass.java index 754313c0534..a39833109f7 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/LombokUtilityClass.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/LombokUtilityClass.java @@ -57,6 +57,7 @@ public J.ClassDeclaration visitClassDeclaration( return JavaTemplate .builder("@UtilityClass") .imports("lombok.experimental.UtilityClass") + .javaParser(JavaParser.fromJavaVersion().classpath("lombok")) .build() .apply( getCursor(),