From 47a981458b7e37476bce36db0050cb2caf56f3ba Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Wed, 4 May 2011 11:15:20 +0200 Subject: [PATCH] SONAR-2346 Failing with Current container state was: CONSTRUCTED --- sonar-batch/src/main/java/org/sonar/batch/Batch.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sonar-batch/src/main/java/org/sonar/batch/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/Batch.java index c2b15adda09..623192824fe 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/Batch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/Batch.java @@ -62,7 +62,13 @@ public class Batch { analyzeModules(bootstrapComponents); } finally { if (bootstrapComponents != null) { - bootstrapComponents.stop(); + try { + bootstrapComponents.stop(); + } catch (Exception e) { + // See http://jira.codehaus.org/browse/SONAR-2346 + // This exception must not override the exception thrown during start() phase. + LOG.error("Fail to stop IoC container", e); + } } } } -- 2.39.5