extract if: keep necessary parenthesis (IDEA-219639)

GitOrigin-RevId: 9582978807c159f8302a1781a5f3388fb0130ad9
This commit is contained in:
Anna Kozlova
2019-08-06 11:10:12 +02:00
committed by intellij-monorepo-bot
parent bf3eefc4b0
commit 774401fb2f
3 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
// "Extract if (b)" "true"
class MyTest {
void foo(boolean a, boolean b, boolean c, boolean d) {
if (b)
if (a && (c || d)) {
}
}
}

View File

@@ -0,0 +1,9 @@
// "Extract if (b)" "true"
class MyTest {
void foo(boolean a, boolean b, boolean c, boolean d) {
if (a && <caret>b && (c || d)) {
}
}
}