IfStatementWithIdenticalBranches: comment preserve extracting then else

IDEA-192301
This commit is contained in:
Roman.Ivanov
2018-05-19 12:35:18 +07:00
parent 1e2249a134
commit 3a9403be81
3 changed files with 44 additions and 11 deletions
@@ -0,0 +1,13 @@
// "Extract common part removing branch " "true"
import java.io.*;
class F {
boolean x(File file) {
// quick fail
if (file.getPath().contains("/test/")) {
System.out.println();
}
return false;
}
}
@@ -0,0 +1,15 @@
// "Extract common part removing branch " "true"
import java.io.*;
class F {
boolean x(File file) {
if<caret> (file.getPath().contains("/test/")) {
System.out.println();
return false;
}
else {
return false; // quick fail
}
}
}