From f3097e2d42b91c1d4c2fd84864857c2a1939d581 Mon Sep 17 00:00:00 2001 From: Jente Sondervorst Date: Mon, 16 Feb 2026 11:36:56 +0100 Subject: [PATCH] Explain why Spring annotations are migrated to JSpecify Improve recipe descriptions for MigrateToJSpecify and MigrateFromSpringFrameworkAnnotations to explain that Spring Framework 7 has adopted JSpecify as its nullability annotation standard. Customers running Spring Boot 4 migrations were confused about why annotation packages were being changed. Closes moderneinc/customer-requests#1869 --- src/main/resources/META-INF/rewrite/jspecify.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/resources/META-INF/rewrite/jspecify.yml b/src/main/resources/META-INF/rewrite/jspecify.yml index c3b8a50e05..64a1cf2016 100644 --- a/src/main/resources/META-INF/rewrite/jspecify.yml +++ b/src/main/resources/META-INF/rewrite/jspecify.yml @@ -35,7 +35,9 @@ type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.jspecify.MigrateToJSpecify displayName: Migrate to JSpecify description: >- - This recipe will migrate to JSpecify annotations from various other nullability annotation standards. + This recipe will migrate to JSpecify nullability annotations from various other annotation standards + including javax, Jakarta, JetBrains, Micrometer, and Micronaut. JSpecify is an industry-wide effort + to provide a single set of nullability annotations for Java. tags: - java preconditions: @@ -155,7 +157,11 @@ recipeList: type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations displayName: Migrate from Spring Framework annotations to JSpecify -description: Migrate from Spring Framework annotations to JSpecify. +description: >- + Spring Framework 7 has adopted JSpecify as its nullability annotation standard, deprecating Spring's own + `org.springframework.lang.@Nullable` and `org.springframework.lang.@NonNull` annotations. This recipe migrates + these annotations to their JSpecify equivalents (`org.jspecify.annotations.@Nullable` and + `org.jspecify.annotations.@NonNull`) and adds the JSpecify dependency. preconditions: - org.openrewrite.Singleton recipeList: