ConstantConditionalExpressionInspection: respect precedence when creating type-cast

Fixes EA-137355 - CCE: ConstantConditionalExpressionInspection$ConstantConditionalFix.doFix
Also fix removing parentheses inside RemoveRedundantCastUtil#removeCast
This commit is contained in:
Tagir Valeev
2019-02-21 13:14:16 +07:00
parent e72a28c3e6
commit 1f132fb51e
4 changed files with 17 additions and 2 deletions
@@ -0,0 +1,6 @@
// "Simplify" "true"
class Test {
void test() {
Object s = "foo" + "bar";
}
}
@@ -0,0 +1,6 @@
// "Simplify" "true"
class Test {
void test() {
Object s = <caret>true ? "foo" + "bar" : 1;
}
}