Skip to content

Commit

Permalink
Upgrade Lombok for Java 11 (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Jul 27, 2023
1 parent 53f843a commit 4745b92
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/resources/META-INF/rewrite/java-version-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ recipeList:
- org.openrewrite.java.migrate.concurrent.JavaConcurrentAPIs
- org.openrewrite.java.migrate.lang.JavaLangAPIs
- org.openrewrite.java.migrate.logging.JavaLoggingAPIs
- org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
- org.openrewrite.java.migrate.net.JavaNetAPIs
- org.openrewrite.java.migrate.sql.JavaSqlAPIs
- org.openrewrite.java.migrate.javax.JavaxLangModelUtil
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/rewrite/java-version-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ recipeList:
- org.openrewrite.java.migrate.Java8toJava11
- org.openrewrite.java.migrate.JavaVersion17
- org.openrewrite.java.migrate.lang.StringFormatted
- org.openrewrite.java.migrate.lombok.UpdateLombokToJava17
- org.openrewrite.github.SetupJavaUpgradeJavaVersion
- org.openrewrite.staticanalysis.InstanceOfPatternMatch
- org.openrewrite.java.migrate.lang.UseTextBlocks
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/rewrite/lombok.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#
---
type: specs.openrewrite.org/v1beta/recipe
name: org.openrewrite.java.migrate.lombok.UpdateLombokToJava17
displayName: Migrate Lombok to a Java 17 compatible version
description: Update Lombok dependency to a version that is compatible with Java 17 and migrate experimental Lombok types that have been promoted.
name: org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
displayName: Migrate Lombok to a Java 11 compatible version
description: Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.
tags:
- java17
- lombok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static org.openrewrite.maven.Assertions.pomXml;
import static org.openrewrite.java.Assertions.java;

public class UpdateLombokToJava17Test implements RewriteTest {
class UpdateLombokToJava11Test implements RewriteTest {

@Override
public void defaults(RecipeSpec spec) {
Expand All @@ -37,7 +37,7 @@ public void defaults(RecipeSpec spec) {
Environment.builder()
.scanRuntimeClasspath("org.openrewrite.java.migrate.lombok")
.build()
.activateRecipes("org.openrewrite.java.migrate.lombok.UpdateLombokToJava17")
.activateRecipes("org.openrewrite.java.migrate.lombok.UpdateLombokToJava11")
)
.parser(
//language=java
Expand Down Expand Up @@ -71,7 +71,7 @@ public void defaults(RecipeSpec spec) {

@SuppressWarnings({"DeprecatedLombok", "deprecation", "Lombok", "RedundantModifiersValueLombok"})
@Test
void upgradeLombokToJava17() {
void updateLombokToJava11() {
rewriteRun(
pomXml(
//language=xml
Expand Down

0 comments on commit 4745b92

Please sign in to comment.