From 04d83db9915e6abb80f6a10ea714325a6624b89a Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 28 Aug 2024 15:28:19 +0200 Subject: [PATCH] Adopt JSpecify Co-authored-by: Moderne --- .../java/org/openrewrite/docker/DockerImageVersion.java | 2 +- src/main/java/org/openrewrite/docker/package-info.java | 6 ++---- .../java/org/openrewrite/docker/search/package-info.java | 4 ++-- .../java/org/openrewrite/docker/table/package-info.java | 4 ++-- src/main/java/org/openrewrite/docker/trait/Dockerfile.java | 2 +- .../java/org/openrewrite/docker/trait/package-info.java | 4 ++-- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/openrewrite/docker/DockerImageVersion.java b/src/main/java/org/openrewrite/docker/DockerImageVersion.java index e9dde9d..31eed9e 100644 --- a/src/main/java/org/openrewrite/docker/DockerImageVersion.java +++ b/src/main/java/org/openrewrite/docker/DockerImageVersion.java @@ -16,7 +16,7 @@ package org.openrewrite.docker; import lombok.Value; -import org.openrewrite.internal.lang.Nullable; +import org.jspecify.annotations.Nullable; @Value public class DockerImageVersion { diff --git a/src/main/java/org/openrewrite/docker/package-info.java b/src/main/java/org/openrewrite/docker/package-info.java index a3e4eea..6f60b60 100644 --- a/src/main/java/org/openrewrite/docker/package-info.java +++ b/src/main/java/org/openrewrite/docker/package-info.java @@ -13,10 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@NonNullApi +@NullMarked @NonNullFields package org.openrewrite.docker; - -// We annotate the package to indicate that fields and methods in this package are non-null by default. -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/docker/search/package-info.java b/src/main/java/org/openrewrite/docker/search/package-info.java index e5c9f32..2f5f3ab 100644 --- a/src/main/java/org/openrewrite/docker/search/package-info.java +++ b/src/main/java/org/openrewrite/docker/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.docker.search; -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/docker/table/package-info.java b/src/main/java/org/openrewrite/docker/table/package-info.java index 3242c9b..8d36ded 100644 --- a/src/main/java/org/openrewrite/docker/table/package-info.java +++ b/src/main/java/org/openrewrite/docker/table/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.docker.table; -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/docker/trait/Dockerfile.java b/src/main/java/org/openrewrite/docker/trait/Dockerfile.java index 648b9a9..85eaf4c 100644 --- a/src/main/java/org/openrewrite/docker/trait/Dockerfile.java +++ b/src/main/java/org/openrewrite/docker/trait/Dockerfile.java @@ -16,9 +16,9 @@ package org.openrewrite.docker.trait; import lombok.Value; +import org.jspecify.annotations.Nullable; import org.openrewrite.Cursor; import org.openrewrite.docker.DockerImageVersion; -import org.openrewrite.internal.lang.Nullable; import org.openrewrite.text.PlainText; import org.openrewrite.trait.SimpleTraitMatcher; import org.openrewrite.trait.Trait; diff --git a/src/main/java/org/openrewrite/docker/trait/package-info.java b/src/main/java/org/openrewrite/docker/trait/package-info.java index 44e8ec1..03d1d86 100644 --- a/src/main/java/org/openrewrite/docker/trait/package-info.java +++ b/src/main/java/org/openrewrite/docker/trait/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.docker.trait; -import org.openrewrite.internal.lang.NonNullApi; +import org.jspecify.annotations.NullMarked; import org.openrewrite.internal.lang.NonNullFields;