File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
main/resources/META-INF/rewrite
test/java/org/openrewrite/java/migrate/jspecify Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ recipeList:
2626 - org.openrewrite.java.jspecify.MigrateFromJavaxAnnotationApi
2727 - org.openrewrite.java.jspecify.MigrateFromJakartaAnnotationApi
2828 - org.openrewrite.java.jspecify.MigrateFromJetbrainsAnnotations
29- - org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations
29+ # Running the following recipe on current versions of Spring can cause Spring to misunderstand a nullable field.
30+ # For instance, a custom Prometheus scrape endpoint with @Nullable Set<String> includedNames will fail if
31+ # includedNames is null and if @Nullable is @org.jspecify.annotations.Nullable.
32+ # - org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations
3033
3134---
3235type : specs.openrewrite.org/v1beta/recipe
Original file line number Diff line number Diff line change 1717
1818import org .junit .jupiter .api .Test ;
1919import org .openrewrite .DocumentExample ;
20+ import org .openrewrite .Issue ;
2021import org .openrewrite .java .JavaParser ;
2122import org .openrewrite .test .RecipeSpec ;
2223import org .openrewrite .test .RewriteTest ;
@@ -324,9 +325,13 @@ class Bar {
324325 );
325326 }
326327
328+ @ Issue ("https://github.com/openrewrite/rewrite-migrate-java/pull/602" )
327329 @ Test
328330 void migrateFromSpringFrameworkAnnotationsToJspecify () {
329331 rewriteRun (
332+ spec -> spec .recipeFromResource (
333+ "/META-INF/rewrite/jspecify.yml" ,
334+ "org.openrewrite.java.jspecify.MigrateFromSpringFrameworkAnnotations" ),
330335 mavenProject ("foo" ,
331336 //language=java
332337 srcMainJava (
You can’t perform that action at this time.
0 commit comments