From 14255d2f890e2738f99a77980806e12f0688c1e2 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Thu, 25 Jul 2019 12:28:31 +0700 Subject: [PATCH] Extract common parts from 'if' GitOrigin-RevId: 60ebdfdb9588caf907ef111e3ed08e799c0a7d17 --- src/org/jetbrains/java/decompiler/main/AssertProcessor.java | 3 +-- .../decompiler/modules/decompiler/stats/SwitchStatement.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/main/AssertProcessor.java b/src/org/jetbrains/java/decompiler/main/AssertProcessor.java index a5f8d72..b0e7b71 100644 --- a/src/org/jetbrains/java/decompiler/main/AssertProcessor.java +++ b/src/org/jetbrains/java/decompiler/main/AssertProcessor.java @@ -320,7 +320,6 @@ public class AssertProcessor { key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString)); } } - return false; } else { if (exprent.type == Exprent.EXPRENT_FIELD) { @@ -328,7 +327,7 @@ public class AssertProcessor { return classname.equals(fdparam.getClassname()) && key.equals(InterpreterUtil.makeUniqueKey(fdparam.getName(), fdparam.getDescriptor().descriptorString)); } - return false; } + return false; } } diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java index 6633d80..ab48ecc 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java @@ -122,7 +122,6 @@ public class SwitchStatement extends Statement { for (int j = 0; j < edges.size(); j++) { if (edges.get(j) == default_edge) { buf.appendIndent(indent).append("default:").appendLineSeparator(); - tracer.incrementCurrentSourceLine(); } else { buf.appendIndent(indent).append("case "); @@ -139,8 +138,8 @@ public class SwitchStatement extends Statement { } buf.append(":").appendLineSeparator(); - tracer.incrementCurrentSourceLine(); } + tracer.incrementCurrentSourceLine(); } buf.append(ExprProcessor.jmpWrapper(stat, indent + 1, false, tracer));