@@ -1056,34 +1056,31 @@ recipeName: org.openrewrite.java.migrate.UpgradePluginsForJava11
10561056examples :
10571057- description : ' '
10581058 sources :
1059- - before : project
1060- language : mavenProject
10611059 - before : |
10621060 <project>
10631061 <groupId>com.mycompany.app</groupId>
10641062 <artifactId>my-app</artifactId>
10651063 <version>1</version>
1064+ <properties>
1065+ <wro4j.version>1.8.0</wro4j.version>
1066+ </properties>
10661067 <build>
10671068 <plugins>
10681069 <plugin>
1069- <groupId>org.codehaus.mojo </groupId>
1070- <artifactId>jaxb2 -maven-plugin</artifactId>
1071- <version>2.3.1 </version>
1070+ <groupId>ro.isdc.wro4j </groupId>
1071+ <artifactId>wro4j -maven-plugin</artifactId>
1072+ <version>${wro4j.version} </version>
10721073 </plugin>
10731074 </plugins>
10741075 </build>
10751076 </project>
1076- path: pom.xml
1077- language: xml
1078- - description : ' '
1079- sources :
1080- - before : |
1077+ after: |
10811078 <project>
10821079 <groupId>com.mycompany.app</groupId>
10831080 <artifactId>my-app</artifactId>
10841081 <version>1</version>
10851082 <properties>
1086- <wro4j.version>1.8.0 </wro4j.version>
1083+ <wro4j.version>1.10.1 </wro4j.version>
10871084 </properties>
10881085 <build>
10891086 <plugins>
@@ -1095,20 +1092,23 @@ examples:
10951092 </plugins>
10961093 </build>
10971094 </project>
1098- after: |
1095+ path: pom.xml
1096+ language: xml
1097+ - description : ' '
1098+ sources :
1099+ - before : project
1100+ language : mavenProject
1101+ - before : |
10991102 <project>
11001103 <groupId>com.mycompany.app</groupId>
11011104 <artifactId>my-app</artifactId>
11021105 <version>1</version>
1103- <properties>
1104- <wro4j.version>1.10.1</wro4j.version>
1105- </properties>
11061106 <build>
11071107 <plugins>
11081108 <plugin>
1109- <groupId>ro.isdc.wro4j </groupId>
1110- <artifactId>wro4j -maven-plugin</artifactId>
1111- <version>${wro4j.version} </version>
1109+ <groupId>org.codehaus.mojo </groupId>
1110+ <artifactId>jaxb2 -maven-plugin</artifactId>
1111+ <version>2.3.1 </version>
11121112 </plugin>
11131113 </plugins>
11141114 </build>
@@ -3361,6 +3361,25 @@ examples:
33613361type : specs.openrewrite.org/v1beta/example
33623362recipeName : org.openrewrite.java.migrate.guava.NoGuava
33633363examples :
3364+ - description : ' '
3365+ sources :
3366+ - before : |
3367+ import com.google.common.base.MoreObjects;
3368+
3369+ class A {
3370+ Object foo(Object obj) {
3371+ return MoreObjects.firstNonNull(obj, "default");
3372+ }
3373+ }
3374+ after: |
3375+ import java.util.Objects;
3376+
3377+ class A {
3378+ Object foo(Object obj) {
3379+ return Objects.requireNonNullElse(obj, "default");
3380+ }
3381+ }
3382+ language: java
33643383 - description : ' '
33653384 sources :
33663385 - before : |
@@ -3407,25 +3426,6 @@ examples:
34073426 }
34083427 }
34093428 language: java
3410- - description : ' '
3411- sources :
3412- - before : |
3413- import com.google.common.base.MoreObjects;
3414-
3415- class A {
3416- Object foo(Object obj) {
3417- return MoreObjects.firstNonNull(obj, "default");
3418- }
3419- }
3420- after: |
3421- import java.util.Objects;
3422-
3423- class A {
3424- Object foo(Object obj) {
3425- return Objects.requireNonNullElse(obj, "default");
3426- }
3427- }
3428- language: java
34293429 ---
34303430type : specs.openrewrite.org/v1beta/example
34313431recipeName : org.openrewrite.java.migrate.guava.NoGuavaAtomicsNewReference
0 commit comments