diff --git a/src/test/resources/refaster/MatchingRecipes.java b/src/test/resources/refaster/MatchingRecipes.java index 992a8cc0..99bc97ef 100644 --- a/src/test/resources/refaster/MatchingRecipes.java +++ b/src/test/resources/refaster/MatchingRecipes.java @@ -1,18 +1,3 @@ -/* - * Copyright 2023 the original author or authors. - *

- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * https://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package foo; import org.openrewrite.ExecutionContext; @@ -82,7 +67,7 @@ public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) { return super.visitMethodInvocation(elem, ctx); } return embed( - apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(0)), + apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0)), getCursor(), ctx ); @@ -92,7 +77,7 @@ public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) { return super.visitMethodInvocation(elem, ctx); } return embed( - apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(0)), + apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0)), getCursor(), ctx ); diff --git a/src/test/resources/refaster/MultipleDereferencesRecipes.java b/src/test/resources/refaster/MultipleDereferencesRecipes.java index aa77561b..bd972580 100644 --- a/src/test/resources/refaster/MultipleDereferencesRecipes.java +++ b/src/test/resources/refaster/MultipleDereferencesRecipes.java @@ -1,18 +1,3 @@ -/* - * Copyright 2023 the original author or authors. - *

- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * https://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package foo; import org.openrewrite.ExecutionContext; @@ -128,7 +113,7 @@ public J visitMethodInvocation(J.MethodInvocation elem, ExecutionContext ctx) { JavaTemplate.Matcher matcher; if ((matcher = matcher(before, getCursor())).find()) { return embed( - apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0), matcher.parameter(0)), + apply(after, getCursor(), elem.getCoordinates().replace(), matcher.parameter(0)), getCursor(), ctx ); diff --git a/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_after.java b/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_after.java index 99db9fb1..07a43c53 100644 --- a/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_after.java +++ b/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_after.java @@ -19,7 +19,7 @@ public class ShouldAddClasspathRecipes$FullyQualifiedRecipe$1_after { public static JavaTemplate.Builder getTemplate() { return JavaTemplate - .builder("org.slf4j.LoggerFactory.getLogger(#{any(java.lang.String)})") + .builder("org.slf4j.LoggerFactory.getLogger(#{message:any(java.lang.String)})") .javaParser(JavaParser.fromJavaVersion().classpath("slf4j-api")); } } diff --git a/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_before.java b/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_before.java index 3c7428c4..468150cc 100644 --- a/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_before.java +++ b/src/test/resources/template/ShouldAddClasspathRecipe$FullyQualifiedRecipe$1_before.java @@ -19,6 +19,6 @@ public class ShouldAddClasspathRecipes$FullyQualifiedRecipe$1_before { public static JavaTemplate.Builder getTemplate() { return JavaTemplate - .builder("System.out.println(#{any(java.lang.String)})"); + .builder("System.out.println(#{message:any(java.lang.String)})"); } } diff --git a/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_after.java b/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_after.java index 8481af7d..be88c040 100644 --- a/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_after.java +++ b/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_after.java @@ -19,7 +19,7 @@ public class ShouldAddClasspathRecipes$UnqualifiedRecipe$1_after { public static JavaTemplate.Builder getTemplate() { return JavaTemplate - .builder("org.slf4j.LoggerFactory.getLogger(#{any(java.lang.String)})") + .builder("org.slf4j.LoggerFactory.getLogger(#{message:any(java.lang.String)})") .javaParser(JavaParser.fromJavaVersion().classpath("slf4j-api")); } } diff --git a/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_before.java b/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_before.java index 6c43a6ad..53d69e5b 100644 --- a/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_before.java +++ b/src/test/resources/template/ShouldAddClasspathRecipe$UnqualifiedRecipe$1_before.java @@ -19,6 +19,6 @@ public class ShouldAddClasspathRecipes$UnqualifiedRecipe$1_before { public static JavaTemplate.Builder getTemplate() { return JavaTemplate - .builder("System.out.println(#{any(java.lang.String)})"); + .builder("System.out.println(#{message:any(java.lang.String)})"); } }