Skip to content

Update NoGuavaRefaster expected output for upstream static-import change#1171

Merged
timtebeek merged 1 commit into
mainfrom
tim/noguava-refaster-static-import-expected
Jul 21, 2026
Merged

Update NoGuavaRefaster expected output for upstream static-import change#1171
timtebeek merged 1 commit into
mainfrom
tim/noguava-refaster-static-import-expected

Conversation

@timtebeek

@timtebeek timtebeek commented Jul 21, 2026

Copy link
Copy Markdown
Member

What's changed?

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, instead of requireNonNull(obj, String.valueOf(description)).

This updates the expected output of preconditionsCheckNotNullToObjectsRequireNonNullTwoArgumentsSecondObject to match current behavior, unblocking the scheduled CI.

Why?

  • Scheduled CI went red on 2026-07-20 (green through 07-19): run #297699568221 test failed. Reproduced locally against the current snapshot.

Note for reviewers: the new output adds import static java.lang.String.valueOf for a single use, which is arguably noisier than the qualified String.valueOf. If that static-import behavior is considered undesirable, the fix belongs upstream in openrewrite/rewrite (Refaster/static-import handling) rather than here — happy to redirect. This PR simply realigns the expectation with shipped behavior.

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
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Jul 21, 2026
@timtebeek
timtebeek merged commit 577446f into main Jul 21, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/noguava-refaster-static-import-expected branch July 21, 2026 10:42
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant