Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow RemoveRedundantTypeCast to deal with generics #209

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

knutwannheden
Copy link
Contributor

The RemoveRedundantTypeCast recipe will now also remove casts when the types involve generics. Further, when the type cast is the expression of a return statement, then the target type will be derived from the corresponding method declaration if any (lambdas are not supported here yet).

Note: This implementation relies on openrewrite/rewrite#3655.

The `RemoveRedundantTypeCast` recipe will now also remove casts when the types involve generics. Further, when the type cast is the expression of a `return` statement, then the target type will be derived from the corresponding method declaration if any (lambdas are not supported here yet).

Note: This implementation relies on openrewrite/rewrite#3655.
@knutwannheden knutwannheden merged commit 0b81110 into main Nov 2, 2023
1 check passed
@knutwannheden knutwannheden deleted the better-removal-of-redundant-casts branch November 2, 2023 14:08
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