diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-10-31 15:24:18 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-11-03 14:29:16 +0100 |
commit | a6499246ce47e223255d91179fb6370f421da4d2 (patch) | |
tree | 98d211431c058fae7a5cf66d61e7124712bb6f9b /sonar-scanner-engine | |
parent | 3f77b1c483891f478fd95cada5f5d1f6f1ea3b14 (diff) | |
download | sonarqube-a6499246ce47e223255d91179fb6370f421da4d2.tar.gz sonarqube-a6499246ce47e223255d91179fb6370f421da4d2.zip |
SONAR-9973 ComponentContainer#stopComponent now never fail
and ensures all stoppable and/or disposable components in the container have their stop and/or dispose methods called
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java index 9d745c53008..d324618ea43 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java @@ -67,12 +67,10 @@ public final class Batch { public synchronized Batch execute() { configureLogging(); doStart(); - boolean threw = true; try { doExecuteTask(globalProperties); - threw = false; } finally { - doStop(threw); + doStop(); } return this; } @@ -150,12 +148,12 @@ public final class Batch { public synchronized void stop() { checkStarted(); configureLogging(); - doStop(false); + doStop(); } - private void doStop(boolean swallowException) { + private void doStop() { try { - bootstrapContainer.stopComponents(swallowException); + bootstrapContainer.stopComponents(); } catch (RuntimeException e) { throw handleException(e); } |