@@ -994,34 +994,31 @@ recipeName: org.openrewrite.java.migrate.UpgradePluginsForJava11
994
994
examples :
995
995
- description : ' '
996
996
sources :
997
- - before : project
998
- language : mavenProject
999
997
- before : |
1000
998
<project>
1001
999
<groupId>com.mycompany.app</groupId>
1002
1000
<artifactId>my-app</artifactId>
1003
1001
<version>1</version>
1002
+ <properties>
1003
+ <wro4j.version>1.8.0</wro4j.version>
1004
+ </properties>
1004
1005
<build>
1005
1006
<plugins>
1006
1007
<plugin>
1007
- <groupId>org.codehaus.mojo </groupId>
1008
- <artifactId>jaxb2 -maven-plugin</artifactId>
1009
- <version>2.3.1 </version>
1008
+ <groupId>ro.isdc.wro4j </groupId>
1009
+ <artifactId>wro4j -maven-plugin</artifactId>
1010
+ <version>${wro4j.version} </version>
1010
1011
</plugin>
1011
1012
</plugins>
1012
1013
</build>
1013
1014
</project>
1014
- path: pom.xml
1015
- language: xml
1016
- - description : ' '
1017
- sources :
1018
- - before : |
1015
+ after: |
1019
1016
<project>
1020
1017
<groupId>com.mycompany.app</groupId>
1021
1018
<artifactId>my-app</artifactId>
1022
1019
<version>1</version>
1023
1020
<properties>
1024
- <wro4j.version>1.8.0 </wro4j.version>
1021
+ <wro4j.version>1.10.1 </wro4j.version>
1025
1022
</properties>
1026
1023
<build>
1027
1024
<plugins>
@@ -1033,20 +1030,23 @@ examples:
1033
1030
</plugins>
1034
1031
</build>
1035
1032
</project>
1036
- after: |
1033
+ path: pom.xml
1034
+ language: xml
1035
+ - description : ' '
1036
+ sources :
1037
+ - before : project
1038
+ language : mavenProject
1039
+ - before : |
1037
1040
<project>
1038
1041
<groupId>com.mycompany.app</groupId>
1039
1042
<artifactId>my-app</artifactId>
1040
1043
<version>1</version>
1041
- <properties>
1042
- <wro4j.version>1.10.1</wro4j.version>
1043
- </properties>
1044
1044
<build>
1045
1045
<plugins>
1046
1046
<plugin>
1047
- <groupId>ro.isdc.wro4j </groupId>
1048
- <artifactId>wro4j -maven-plugin</artifactId>
1049
- <version>${wro4j.version} </version>
1047
+ <groupId>org.codehaus.mojo </groupId>
1048
+ <artifactId>jaxb2 -maven-plugin</artifactId>
1049
+ <version>2.3.1 </version>
1050
1050
</plugin>
1051
1051
</plugins>
1052
1052
</build>
@@ -3279,6 +3279,25 @@ examples:
3279
3279
type : specs.openrewrite.org/v1beta/example
3280
3280
recipeName : org.openrewrite.java.migrate.guava.NoGuava
3281
3281
examples :
3282
+ - description : ' '
3283
+ sources :
3284
+ - before : |
3285
+ import com.google.common.base.MoreObjects;
3286
+
3287
+ class A {
3288
+ Object foo(Object obj) {
3289
+ return MoreObjects.firstNonNull(obj, "default");
3290
+ }
3291
+ }
3292
+ after: |
3293
+ import java.util.Objects;
3294
+
3295
+ class A {
3296
+ Object foo(Object obj) {
3297
+ return Objects.requireNonNullElse(obj, "default");
3298
+ }
3299
+ }
3300
+ language: java
3282
3301
- description : ' '
3283
3302
sources :
3284
3303
- before : |
@@ -3325,25 +3344,6 @@ examples:
3325
3344
}
3326
3345
}
3327
3346
language: java
3328
- - description : ' '
3329
- sources :
3330
- - before : |
3331
- import com.google.common.base.MoreObjects;
3332
-
3333
- class A {
3334
- Object foo(Object obj) {
3335
- return MoreObjects.firstNonNull(obj, "default");
3336
- }
3337
- }
3338
- after: |
3339
- import java.util.Objects;
3340
-
3341
- class A {
3342
- Object foo(Object obj) {
3343
- return Objects.requireNonNullElse(obj, "default");
3344
- }
3345
- }
3346
- language: java
3347
3347
---
3348
3348
type : specs.openrewrite.org/v1beta/example
3349
3349
recipeName : org.openrewrite.java.migrate.guava.NoGuavaAtomicsNewReference
0 commit comments