From b7d19f060c4dd1916937011e4f77cd243cdf9437 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Tue, 20 Nov 2018 18:30:13 +0700 Subject: [PATCH] ControlFlowAnalyzer: cosmetics (IDEA-CR-40127) --- .../codeInspection/dataFlow/ControlFlowAnalyzer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ControlFlowAnalyzer.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ControlFlowAnalyzer.java index b97b6fd73f9e..ed225c789c98 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ControlFlowAnalyzer.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/ControlFlowAnalyzer.java @@ -800,10 +800,9 @@ public class ControlFlowAnalyzer extends JavaElementVisitor { PsiExpression returnValue = statement.getReturnValue(); - InlinedBlockContext context = myInlinedBlockContext; - if (context != null) { + if (myInlinedBlockContext != null) { // We treat return inside switch expression (which is disallowed syntax) as break-with-value - context.generateReturn(returnValue, this); + myInlinedBlockContext.generateReturn(returnValue, this); } else { if (returnValue != null) { @@ -2044,9 +2043,7 @@ public class ControlFlowAnalyzer extends JavaElementVisitor { exitInlinedBlock(); } - private void enterInlinedBlock(@NotNull PsiCodeBlock block, - @NotNull Nullability resultNullability, - @NotNull DfaVariableValue target) { + private void enterInlinedBlock(@NotNull PsiCodeBlock block, @NotNull Nullability resultNullability, @NotNull DfaVariableValue target) { // Transfer value is pushed to avoid emptying stack beyond this point pushTrap(new Trap.InsideInlinedBlock(block)); addInstruction(new PushInstruction(myFactory.controlTransfer(ReturnTransfer.INSTANCE, FList.emptyList()), null));