From e21a5beb65c04a5bf692da5402f2d8fad0089f21 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Tue, 13 Nov 2018 14:45:43 +0700 Subject: [PATCH] AssertAllInliner: push method result value (Fixes EA-129810 - ESE: Stack.pop) --- .../codeInspection/dataFlow/inliner/AssertAllInliner.java | 3 ++- .../testData/inspection/dataFlow/fixture/AssertAll.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inliner/AssertAllInliner.java b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inliner/AssertAllInliner.java index b9a0b5744444..8912b3dcba27 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inliner/AssertAllInliner.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inliner/AssertAllInliner.java @@ -54,7 +54,8 @@ public class AssertAllInliner implements CallInliner { builder.push(result) .ifConditionIs(true) .doThrow(throwable) - .end(); + .end() + .pushUnknown(); // void method result return true; } } diff --git a/java/java-tests/testData/inspection/dataFlow/fixture/AssertAll.java b/java/java-tests/testData/inspection/dataFlow/fixture/AssertAll.java index 7909801be9e2..8571c9a4d00b 100644 --- a/java/java-tests/testData/inspection/dataFlow/fixture/AssertAll.java +++ b/java/java-tests/testData/inspection/dataFlow/fixture/AssertAll.java @@ -58,4 +58,8 @@ public class AssertAll { } ); } + + void testEmpty() { + Assertions.assertAll(); + } } \ No newline at end of file