Skip to content

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
@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.

2 participants