Skip to content

Commit c20f524

Browse files
committed
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
1 parent 9b7a874 commit c20f524

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/java/org/openrewrite/java/migrate/guava/NoGuavaRefasterTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,12 @@ Object foo(Object obj, StringBuilder description) {
128128
}
129129
""",
130130
"""
131+
import static java.lang.String.valueOf;
131132
import static java.util.Objects.requireNonNull;
132133
133134
class A {
134135
Object foo(Object obj, StringBuilder description) {
135-
return requireNonNull(obj, String.valueOf(description));
136+
return requireNonNull(obj, valueOf(description));
136137
}
137138
}
138139
"""

0 commit comments

Comments
 (0)