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

InstanceOf: no action if type casts with specific type params used #338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BoykoAlex
Copy link
Contributor

If type casts to types with defined type parameters are used, i.e. List<Object>, List<String> it is difficult to determine if possible at all if instanceof List list or instanceof List<?> list isappropriate. Soem cases where type cast without type params is used and with it is impossible to determine. Therefore, I think it is best not to touch such instanceof <-> type cats patterns.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions could not be made:

  • src/main/java/org/openrewrite/staticanalysis/InstanceOfPatternMatch.java
    • lines 299-301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant