invert if: don't include single rBrace in block

found by property testing
This commit is contained in:
Anna.Kozlova
2018-11-09 13:51:51 +01:00
parent b1ede49516
commit 338f87ab95
3 changed files with 46 additions and 3 deletions
@@ -0,0 +1,20 @@
// "Invert 'if' condition" "true"
class A {
void foo(boolean b, String[] entries) {
{
try {
String filePath = "";
for (String entry : entries) {
final String rootPath = "";
if (!b) {
}
else {
break;
}
}
}
finally {
}
}
}
}
@@ -0,0 +1,18 @@
// "Invert 'if' condition" "true"
class A {
void foo(boolean b, String[] entries) {
{
try {
String filePath = "";
for (String entry : entries) {
final String rootPath = "";
i<caret>f (b) {
break;
}
}
}
finally {
}
}
}
}