Files
openide/java/java-tests/testData/codeInsight/invertIfCondition/afterRedundantParenthesis.java
Anna Kozlova 0ebca9cff2 invert if: check precedence and keep parenthesis accordingly (IDEA-175062)
replace duplicated negation utility
2018-01-03 14:18:52 +01:00

13 lines
261 B
Java

// "Invert 'if' condition" "true"
class A {
void method(Object x) {
if (x instanceof String) {
System.out.println(((String) x).toUpperCase());
}
else {
System.out.println(x.toString());
}
}
}