Files
openide/java/java-tests/testData/codeInsight/invertIfCondition/beforeRedundantParenthesis.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

12 lines
263 B
Java

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