MethodType parameter names not retained#5923
Merged
Conversation
rewrite-java-21/src/test/java/org/openrewrite/java/MethodTypeTest.java
Outdated
Show resolved
Hide resolved
rewrite-java-21/src/main/java/org/openrewrite/java/isolated/ReloadableJava21TypeMapping.java
Outdated
Show resolved
Hide resolved
timtebeek
commented
Aug 16, 2025
rewrite-java-21/src/test/java/org/openrewrite/java/MethodTypeTest.java
Outdated
Show resolved
Hide resolved
Contributor
|
I think there may have been a bug in the type table writer, so that it didn't write out parameter names. I fixed that when I added annotation support. |
Member
Author
|
They'd helpful, but this test still failed over the weekend and is using direct classpath dependencies right, not classpathFromResources? |
Contributor
I didn't actually check. Your comment just reminded me of this issue. |
rewrite-java-21/src/test/java/org/openrewrite/java/MethodTypeTest.java
Outdated
Show resolved
Hide resolved
knutwannheden
approved these changes
Aug 18, 2025
rewrite-java-tck/src/main/java/org/openrewrite/java/tree/MethodInvocationTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dcsekar
pushed a commit
to dcsekar/rewrite
that referenced
this pull request
Aug 18, 2025
* MethodType parameter names not retained for Guava method * Show a possible solution with reflection by Claude * Remove special handling for int/String * Pass in `-parameters` instead * Revert formatting changes * Replicate change to other Java parser versions * Move test method and use assertj-core which is already present * Revert to `get(0)` when running on Java 8, 11 & 17 * Only enable test on Java 11+ for now * Minimize accidental changes between Java 8 and 11 parsers * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Despite being present in the source
And retained as per the build tool
We don't currently see the method type parameter names shown correctly, which we need for templated replacements.
What's your motivation?
@InlineMe) #5400@InlineMeannotation replacements rewrite-migrate-java#788