NestedIfJoinLinesHandler: fix polyadic case.

Fixes IDEA-190660 ClassCastException after code reformatting using 'Join Lines'
Fixes EA-119515 - CCE: NestedIfJoinLinesHandler.tryJoinLines
This commit is contained in:
Tagir Valeev
2018-04-21 18:11:50 +07:00
parent c54070c74f
commit 2590753b28
6 changed files with 17 additions and 4 deletions
@@ -1,5 +1,5 @@
class Foo {
void test(int a, int b) {
if(a > 0 && b < 0) System.out.println(a + b);
if(a > 0 <caret>&& b < 0) System.out.println(a + b);
}
}
@@ -0,0 +1,7 @@
class Foo {
void test(int a, int b) {
<caret>if(a > 0 && a < 10) {
if (b > 0 && b < 10) System.out.println(a + b);
}
}
}
@@ -0,0 +1,5 @@
class Foo {
void test(int a, int b) {
if(a > 0 && a < 10 <caret>&& b > 0 && b < 10) System.out.println(a + b);
}
}
@@ -1,6 +1,6 @@
class Foo {
void test(int a, int b) {
if(a > 0 && b < 0) {
if(a > 0 <caret>&& b < 0) {
System.out.println(a+b);
}
}