-
Notifications
You must be signed in to change notification settings - Fork 70
Handling parentheses sometimes needed around instanceof #521
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
Handling parentheses sometimes needed around instanceof #521
Conversation
There was a problem hiding this 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/test/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethodsTest.java
- lines 101-101
@@ -33,6 +33,7 @@ | |||
import org.openrewrite.java.tree.JavaType; | |||
|
|||
import java.util.Collections; | |||
import java.util.function.Function; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.function.Function; | |
import java.util.function.Function; |
src/test/java/org/openrewrite/staticanalysis/ReplaceClassIsInstanceWithInstanceofTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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/test/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethodsTest.java
- lines 101-102
@@ -33,6 +33,7 @@ | |||
import org.openrewrite.java.tree.JavaType; | |||
|
|||
import java.util.Collections; | |||
import java.util.function.Function; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import java.util.function.Function; | |
import java.util.function.Function; |
What's changed?
Fixing
ReplaceClassIsInstanceWithInstanceof
wrt to parenthesis being sometimes needed around theinstanceof
.What's your motivation?
Fix the errors observed in real-life, e.g.
this code in spring-hateoas throws: