Skip to content

Fix @InlineMe generator: type variable patterns and bridge methods - #97

Merged
timtebeek merged 6 commits into
mainfrom
tim/fix-inlineme-generator-wildcards
Aug 17, 2026
Merged

Fix @InlineMe generator: type variable patterns and bridge methods#97
timtebeek merged 6 commits into
mainfrom
tim/fix-inlineme-generator-wildcards

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 17, 2026

Copy link
Copy Markdown
Member

InlineMethodCallsRecipeGenerator derived method pattern parameters from the erased descriptor, so type variables became java.lang.Object and could never match a call site (Range#apply, BloomFilter#test, …); parameters are now taken from the generic signature, emitting * per type variable, with a fallback to the descriptor. Bridge and synthetic members are now skipped, as they carry a copy of the annotation of the method they delegate to and produced junk entries on private nested classes.

The generator also now reads both the main and test type table (Guava lives in one, log4j-api in the other, and only the first was visible before), and writes to build/generated, as the generated YAML is copied into rewrite-migrate-java rather than shipped from here. The type tables are refreshed, which picks up Guava 33.7.0-jre along with newer versions of the other + dependencies, and adds the previously missing eclipse-collections.

Derive parameters from the generic signature, so type variables become `*`
instead of their erasure, which can never match at a call site. Skip bridge
and synthetic members, which carry a copy of the annotation of the method
they delegate to.

Read both the main and test type table, write the generated recipes to
`build/generated`, and refresh the type tables to pick up Guava 33.7.0.
@timtebeek
timtebeek marked this pull request as ready for review August 17, 2026 18:31
@timtebeek
timtebeek merged commit 30103dd into main Aug 17, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/fix-inlineme-generator-wildcards branch August 17, 2026 20:14
@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

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant