'Switch' statements with single case converted to 'if', other warnings fixed

master
Tagir Valeev 6 years ago
parent c7bdab8b00
commit 32674967de
  1. 3
      src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java
  2. 3
      src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java

@ -80,8 +80,7 @@ public class ExitHelper {
}
}
switch (stat.type) {
case Statement.TYPE_IF:
if (stat.type == Statement.TYPE_IF) {
IfStatement ifst = (IfStatement)stat;
if (ifst.getIfstat() == null) {
StatEdge ifedge = ifst.getIfEdge();

@ -376,8 +376,7 @@ public class MergeHelper {
return stat;
}
switch (stat.type) {
case Statement.TYPE_SEQUENCE:
if (stat.type == Statement.TYPE_SEQUENCE) {
for (int i = stat.getStats().size() - 1; i >= 0; i--) {
Statement tmp = getLastDirectData(stat.getStats().get(i));
if (tmp == null || !tmp.getExprents().isEmpty()) {

Loading…
Cancel
Save