Skip to content

Update inline Guava recipes for Guava 33.7.0 - #1207

Merged
timtebeek merged 4 commits into
mainfrom
tim/inline-guava-33-7-methods
Aug 17, 2026
Merged

Update inline Guava recipes for Guava 33.7.0#1207
timtebeek merged 4 commits into
mainfrom
tim/inline-guava-33-7-methods

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 17, 2026

Copy link
Copy Markdown
Member

Guava 33.7.0 adds @InlineMe to the four com.google.common.util.concurrent.Atomics factory methods (nothing was removed or changed), so inline-guava-33-methods.yml gains recipes inlining them to new 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/#test and Ordering#binarySearch dead. All of these now use *, which is unambiguous since none has a same arity overload, and each is covered by a new test. InlineMethodCallsRecipeGenerator in 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 the newReferenceArray(..) overloads it never handled, the hand written NoGuavaAtomicsNewReference is removed; NoGuava reaches both through the same list, so its coverage is unchanged.

Finally, the parserClasspath bump to 33.7.0-jre regenerates classpath.tsv.gz, which also picks up the dynamic versions error_prone_core 2.48.0 -> 2.50.0 and lombok 1.18.42 -> 1.18.46, with recipes.csv and examples.yml updated to match.

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.
timtebeek and others added 2 commits August 17, 2026 22:11
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.
@timtebeek
timtebeek merged commit 57c644c into main Aug 17, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/inline-guava-33-7-methods branch August 17, 2026 20:50
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Aug 17, 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