From c20f5249a5ca90ff677b75d1dd0c3cd6c58920db Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 21 Jul 2026 12:21:40 +0200 Subject: [PATCH] Update NoGuavaRefaster expected output for upstream static-import change The 2026-07-20 openrewrite/rewrite snapshot changed NoGuavaRefaster so that Preconditions.checkNotNull(obj, description) now migrates to requireNonNull(obj, valueOf(description)) with a static import of java.lang.String.valueOf, rather than String.valueOf(description). Aligns the expected output in preconditionsCheckNotNullToObjectsRequireNonNullTwoArgumentsSecondObject with current behavior. CI: https://github.com/openrewrite/rewrite-migrate-java/actions/runs/29769956822 --- .../openrewrite/java/migrate/guava/NoGuavaRefasterTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/openrewrite/java/migrate/guava/NoGuavaRefasterTest.java b/src/test/java/org/openrewrite/java/migrate/guava/NoGuavaRefasterTest.java index 3e6931e834..cb32dfb3fe 100644 --- a/src/test/java/org/openrewrite/java/migrate/guava/NoGuavaRefasterTest.java +++ b/src/test/java/org/openrewrite/java/migrate/guava/NoGuavaRefasterTest.java @@ -128,11 +128,12 @@ Object foo(Object obj, StringBuilder description) { } """, """ + import static java.lang.String.valueOf; import static java.util.Objects.requireNonNull; class A { Object foo(Object obj, StringBuilder description) { - return requireNonNull(obj, String.valueOf(description)); + return requireNonNull(obj, valueOf(description)); } } """