Fix #5493: [java] IllegalArgumentException with wildcard bound#5529
Merged
Conversation
This is a leftover from pmd#5387. Additionally, lambda parameter types are now projected upwards. That means they are "clean", like inferred variable types, they don't mention capture variables. Since their uses are captured anyway where it matters, this shouldn't change anything to the precision of inferred types.
Generated by 🚫 Danger |
4 tasks
Member
|
This change unfortunately triggers now an UnusedPrivateMethod problem in pmd-core: |
Member
Author
|
Aah I thought that was a red herring. I didn't consider that the change might really change the behaviour of the rule. And since this is reported as a warning I thought the actual error was hidden. I will look into it |
Capturing a tvar does not return a tvar with a changed bound anymore. The upper bound only needs to be captured if we are trying to find its methods, eg if it is the LHS of a method call expression.
6bbe605 to
ab3240c
Compare
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.
This is a leftover from #5387. Additionally, lambda parameter types are now projected upwards. That means they are "clean", like inferred local variable types, they don't mention capture variables. Since their uses are captured
anyway where it matters, this shouldn't change anything to the precision of inferred types.
Describe the PR
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)