Update inline Guava recipes for Guava 33.7.0 - #1207
Merged
Merged
Conversation
Guava 33.7.0 adds `@InlineMe` to the four `Atomics` factory methods; the generated recipes and the `guava-33` type table are updated to match. Type variable parameters resolve to their call site type, so `*` is used in those method patterns rather than the erasure the generator emits.
Seven method patterns targeted parameters declared as type variables. At a call site those resolve to the concrete argument type rather than to the erasure, so the patterns never matched and the recipes were dead. None of the seven has a same arity overload, so `*` is unambiguous.
Guava 33.7.0 adds `@InlineMe` to the `Atomics` factory methods, so the generated `InlineGuavaMethods` recipes now cover `newReference(..)`, along with the `newReferenceArray(..)` overloads this recipe never handled. `NoGuava` reaches both through the same list, so its coverage is unchanged.
mergify Bot
added a commit
to robfrank/linklift
that referenced
this pull request
Sep 6, 2026
…42.0 to 3.42.1 [skip ci] Bumps [org.openrewrite.recipe:rewrite-migrate-java](https://github.com/openrewrite/rewrite-migrate-java) from 3.42.0 to 3.42.1. Release notes *Sourced from [org.openrewrite.recipe:rewrite-migrate-java's releases](https://github.com/openrewrite/rewrite-migrate-java/releases).* > v3.42.1 > ------- > > What's Changed > -------------- > > * Do not duplicate JSpecify annotations when several annotations map to one by [`@timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1200](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1200) > * Upgrade `maven-pmd-plugin` as part of the Java 17 migration by [`@timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1208](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1208) > * Update inline Guava recipes for Guava 33.7.0 by [`@timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1207](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1207) > * Extend `UseListOf` prose pattern to `LinkedHashSet` by [`@timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1209](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1209) > > **Full Changelog**: <openrewrite/rewrite-migrate-java@v3.42.0...v3.42.1> Commits * [`c5ef164`](openrewrite/rewrite-migrate-java@c5ef164) Extend `UseListOf` prose pattern to `LinkedHashSet` ([#1181](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1181)) ([#1209](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1209)) * [`57c644c`](openrewrite/rewrite-migrate-java@57c644c) Update inline Guava recipes for Guava 33.7.0 ([#1207](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1207)) * [`4a91085`](openrewrite/rewrite-migrate-java@4a91085) Upgrade `maven-pmd-plugin` as part of the Java 17 migration ([#1208](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1208)) * [`1cb4f8d`](openrewrite/rewrite-migrate-java@1cb4f8d) [Auto] SDKMAN! Java candidates as of 2026-08-17T1025 * [`75f07f7`](openrewrite/rewrite-migrate-java@75f07f7) Do not duplicate JSpecify annotations when several annotations map to one ([#1](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1)... * See full diff in [compare view](openrewrite/rewrite-migrate-java@v3.42.0...v3.42.1) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guava 33.7.0 adds
@InlineMeto the fourcom.google.common.util.concurrent.Atomicsfactory methods (nothing was removed or changed), soinline-guava-33-methods.ymlgains recipes inlining them tonew AtomicReference<>(..)/new AtomicReferenceArray<>(..).This also fixes seven pre-existing entries that could never match: their method patterns target parameters declared as type variables, which resolve at the call site to the concrete argument type rather than to the erasure the generator emits, leaving
Range#apply/#test,Equivalence#test,Converter#apply,BloomFilter#apply/#testandOrdering#binarySearchdead. All of these now use*, which is unambiguous since none has a same arity overload, and each is covered by a new test.InlineMethodCallsRecipeGeneratorin rewrite-third-party has been updated to emit both of these correctly, so regenerating reproduces this file rather than reintroducing the dead entries.Since the generated recipes now cover
Atomics#newReference(..), along with thenewReferenceArray(..)overloads it never handled, the hand writtenNoGuavaAtomicsNewReferenceis removed;NoGuavareaches both through the same list, so its coverage is unchanged.Finally, the
parserClasspathbump to33.7.0-jreregeneratesclasspath.tsv.gz, which also picks up the dynamic versionserror_prone_core2.48.0 -> 2.50.0 andlombok1.18.42 -> 1.18.46, withrecipes.csvandexamples.ymlupdated to match.