From 41c55c7b0f677b4cf8bcb29113994878f672b202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Schn=C3=A9ider?= Date: Thu, 15 Aug 2024 00:37:40 -0400 Subject: [PATCH] Migrate to JSpecify from OpenRewrite JSR-305 meta-annotations (#87) Use this link to re-run the recipe: https://app.moderne.io/builder/gW3xaSLWV?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- src/main/java/org/openrewrite/quarkus/AddQuarkusProperty.java | 2 +- .../org/openrewrite/quarkus/ChangeQuarkusPropertyKey.java | 2 +- .../openrewrite/quarkus/ChangeQuarkusPropertyKeyVisitor.java | 2 +- .../org/openrewrite/quarkus/ChangeQuarkusPropertyValue.java | 2 +- .../quarkus/ChangeQuarkusPropertyValueVisitor.java | 2 +- .../java/org/openrewrite/quarkus/DeleteQuarkusProperty.java | 2 +- .../org/openrewrite/quarkus/DeleteQuarkusPropertyVisitor.java | 2 +- .../org/openrewrite/quarkus/QuarkusExecutionContextView.java | 2 +- src/main/java/org/openrewrite/quarkus/package-info.java | 4 ++-- .../quarkus/quarkus2/UsePanacheEntityBaseStaticMethods.java | 2 +- .../java/org/openrewrite/quarkus/quarkus2/package-info.java | 4 ++-- .../org/openrewrite/quarkus/search/FindQuarkusProfiles.java | 2 +- .../org/openrewrite/quarkus/search/FindQuarkusProperties.java | 2 +- .../java/org/openrewrite/quarkus/search/package-info.java | 4 ++-- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/openrewrite/quarkus/AddQuarkusProperty.java b/src/main/java/org/openrewrite/quarkus/AddQuarkusProperty.java index bd31e79..cc67090 100644 --- a/src/main/java/org/openrewrite/quarkus/AddQuarkusProperty.java +++ b/src/main/java/org/openrewrite/quarkus/AddQuarkusProperty.java @@ -17,9 +17,9 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; import org.openrewrite.internal.StringUtils; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.properties.AddProperty; import org.openrewrite.properties.tree.Properties; import org.openrewrite.yaml.MergeYaml; diff --git a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKey.java b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKey.java index 98d15a7..c9c46cb 100644 --- a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKey.java +++ b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKey.java @@ -17,9 +17,9 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; import org.openrewrite.internal.StringUtils; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.quarkus.search.FindQuarkusProperties; import java.util.List; diff --git a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKeyVisitor.java b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKeyVisitor.java index 44c6d6e..bd03434 100644 --- a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKeyVisitor.java +++ b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyKeyVisitor.java @@ -16,11 +16,11 @@ package org.openrewrite.quarkus; import lombok.RequiredArgsConstructor; +import org.jspecify.annotations.Nullable; import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.openrewrite.Tree; import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.properties.tree.Properties; import org.openrewrite.quarkus.search.FindQuarkusProperties; import org.openrewrite.yaml.tree.Yaml; diff --git a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValue.java b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValue.java index 0bb4f4c..84f15a4 100644 --- a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValue.java +++ b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValue.java @@ -17,9 +17,9 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; import org.openrewrite.internal.StringUtils; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.quarkus.search.FindQuarkusProperties; import java.util.List; diff --git a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValueVisitor.java b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValueVisitor.java index 532e524..e0551ac 100644 --- a/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValueVisitor.java +++ b/src/main/java/org/openrewrite/quarkus/ChangeQuarkusPropertyValueVisitor.java @@ -16,11 +16,11 @@ package org.openrewrite.quarkus; import lombok.RequiredArgsConstructor; +import org.jspecify.annotations.Nullable; import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.openrewrite.Tree; import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.properties.tree.Properties; import org.openrewrite.quarkus.search.FindQuarkusProperties; import org.openrewrite.yaml.tree.Yaml; diff --git a/src/main/java/org/openrewrite/quarkus/DeleteQuarkusProperty.java b/src/main/java/org/openrewrite/quarkus/DeleteQuarkusProperty.java index fc24c72..409cd65 100644 --- a/src/main/java/org/openrewrite/quarkus/DeleteQuarkusProperty.java +++ b/src/main/java/org/openrewrite/quarkus/DeleteQuarkusProperty.java @@ -17,9 +17,9 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; import org.openrewrite.internal.StringUtils; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.quarkus.search.FindQuarkusProperties; import java.util.List; diff --git a/src/main/java/org/openrewrite/quarkus/DeleteQuarkusPropertyVisitor.java b/src/main/java/org/openrewrite/quarkus/DeleteQuarkusPropertyVisitor.java index f56989f..ea02b2f 100644 --- a/src/main/java/org/openrewrite/quarkus/DeleteQuarkusPropertyVisitor.java +++ b/src/main/java/org/openrewrite/quarkus/DeleteQuarkusPropertyVisitor.java @@ -16,11 +16,11 @@ package org.openrewrite.quarkus; import lombok.RequiredArgsConstructor; +import org.jspecify.annotations.Nullable; import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.openrewrite.Tree; import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.properties.tree.Properties; import org.openrewrite.quarkus.search.FindQuarkusProperties; import org.openrewrite.yaml.tree.Yaml; diff --git a/src/main/java/org/openrewrite/quarkus/QuarkusExecutionContextView.java b/src/main/java/org/openrewrite/quarkus/QuarkusExecutionContextView.java index 4cdc964..9964cab 100644 --- a/src/main/java/org/openrewrite/quarkus/QuarkusExecutionContextView.java +++ b/src/main/java/org/openrewrite/quarkus/QuarkusExecutionContextView.java @@ -15,11 +15,11 @@ */ package org.openrewrite.quarkus; +import org.jspecify.annotations.Nullable; import org.openrewrite.DelegatingExecutionContext; import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.openrewrite.Tree; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.properties.tree.Properties; import org.openrewrite.yaml.tree.Yaml; diff --git a/src/main/java/org/openrewrite/quarkus/package-info.java b/src/main/java/org/openrewrite/quarkus/package-info.java index 9ccfac4..f3f5c64 100644 --- a/src/main/java/org/openrewrite/quarkus/package-info.java +++ b/src/main/java/org/openrewrite/quarkus/package-info.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@NonNullApi +@NullMarked @NonNullFields package org.openrewrite.quarkus; -import org.openrewrite.internal.lang.NonNullApi; +import org.jspecify.annotations.NullMarked; import org.openrewrite.internal.lang.NonNullFields; diff --git a/src/main/java/org/openrewrite/quarkus/quarkus2/UsePanacheEntityBaseStaticMethods.java b/src/main/java/org/openrewrite/quarkus/quarkus2/UsePanacheEntityBaseStaticMethods.java index 1cbdce3..ef8d438 100644 --- a/src/main/java/org/openrewrite/quarkus/quarkus2/UsePanacheEntityBaseStaticMethods.java +++ b/src/main/java/org/openrewrite/quarkus/quarkus2/UsePanacheEntityBaseStaticMethods.java @@ -15,11 +15,11 @@ */ package org.openrewrite.quarkus.quarkus2; +import org.jspecify.annotations.Nullable; import org.openrewrite.ExecutionContext; import org.openrewrite.Preconditions; import org.openrewrite.Recipe; import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.java.ChangeMethodTargetToStatic; import org.openrewrite.java.JavaIsoVisitor; import org.openrewrite.java.MethodMatcher; diff --git a/src/main/java/org/openrewrite/quarkus/quarkus2/package-info.java b/src/main/java/org/openrewrite/quarkus/quarkus2/package-info.java index 45c12ba..f950180 100644 --- a/src/main/java/org/openrewrite/quarkus/quarkus2/package-info.java +++ b/src/main/java/org/openrewrite/quarkus/quarkus2/package-info.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@NonNullApi +@NullMarked @NonNullFields package org.openrewrite.quarkus.quarkus2; -import org.openrewrite.internal.lang.NonNullApi; +import org.jspecify.annotations.NullMarked; import org.openrewrite.internal.lang.NonNullFields; diff --git a/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProfiles.java b/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProfiles.java index bb0d2fd..27912ad 100644 --- a/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProfiles.java +++ b/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProfiles.java @@ -17,8 +17,8 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.marker.SearchResult; import org.openrewrite.properties.PropertiesIsoVisitor; import org.openrewrite.properties.tree.Properties; diff --git a/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProperties.java b/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProperties.java index 70c994e..c5a5419 100644 --- a/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProperties.java +++ b/src/main/java/org/openrewrite/quarkus/search/FindQuarkusProperties.java @@ -17,9 +17,9 @@ import lombok.EqualsAndHashCode; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.*; import org.openrewrite.internal.StringUtils; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.marker.SearchResult; import org.openrewrite.properties.PropertiesIsoVisitor; import org.openrewrite.properties.PropertiesVisitor; diff --git a/src/main/java/org/openrewrite/quarkus/search/package-info.java b/src/main/java/org/openrewrite/quarkus/search/package-info.java index 12e8564..243829d 100644 --- a/src/main/java/org/openrewrite/quarkus/search/package-info.java +++ b/src/main/java/org/openrewrite/quarkus/search/package-info.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@NonNullApi +@NullMarked @NonNullFields package org.openrewrite.quarkus.search; -import org.openrewrite.internal.lang.NonNullApi; +import org.jspecify.annotations.NullMarked; import org.openrewrite.internal.lang.NonNullFields;