Extract common parts from 'if'

GitOrigin-RevId: 60ebdfdb9588caf907ef111e3ed08e799c0a7d17
master
Tagir Valeev 5 years ago committed by intellij-monorepo-bot
parent 877b0bb707
commit 14255d2f89
  1. 3
      src/org/jetbrains/java/decompiler/main/AssertProcessor.java
  2. 3
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java

@ -320,7 +320,6 @@ public class AssertProcessor {
key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString)); key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString));
} }
} }
return false;
} }
else { else {
if (exprent.type == Exprent.EXPRENT_FIELD) { if (exprent.type == Exprent.EXPRENT_FIELD) {
@ -328,7 +327,7 @@ public class AssertProcessor {
return classname.equals(fdparam.getClassname()) && return classname.equals(fdparam.getClassname()) &&
key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString)); key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString));
} }
return false;
} }
return false;
} }
} }

@ -122,7 +122,6 @@ public class SwitchStatement extends Statement {
for (int j = 0; j < edges.size(); j++) { for (int j = 0; j < edges.size(); j++) {
if (edges.get(j) == default_edge) { if (edges.get(j) == default_edge) {
buf.appendIndent(indent).append("default:").appendLineSeparator(); buf.appendIndent(indent).append("default:").appendLineSeparator();
tracer.incrementCurrentSourceLine();
} }
else { else {
buf.appendIndent(indent).append("case "); buf.appendIndent(indent).append("case ");
@ -139,8 +138,8 @@ public class SwitchStatement extends Statement {
} }
buf.append(":").appendLineSeparator(); buf.append(":").appendLineSeparator();
tracer.incrementCurrentSourceLine();
} }
tracer.incrementCurrentSourceLine();
} }
buf.append(ExprProcessor.jmpWrapper(stat, indent + 1, false, tracer)); buf.append(ExprProcessor.jmpWrapper(stat, indent + 1, false, tracer));

Loading…
Cancel
Save