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

Merged
merged 1 commit into from
Oct 1, 2024

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

@sambsnyd sambsnyd merged commit 35606d1 into openrewrite:main Oct 1, 2024
1 of 2 checks passed
@sambsnyd
Copy link
Member

sambsnyd commented Oct 1, 2024

Thanks @BoykoAlex !

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