diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-11 13:28:15 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-11 13:28:15 +0100 |
commit | f1b81885dca255b308c8ea26319ada173320ad23 (patch) | |
tree | 4dad98142dac042886a19059717a0fbcc9456ace /sonar-batch | |
parent | d511d8c008b393c6cd0af67cbe18db760667c6f4 (diff) | |
download | sonarqube-f1b81885dca255b308c8ea26319ada173320ad23.tar.gz sonarqube-f1b81885dca255b308c8ea26319ada173320ad23.zip |
SONAR-3887 unlock the semaphore when plugin license si not valid
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java index 254cd8c4f25..c670d4439ec 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/Batch.java @@ -68,14 +68,17 @@ public final class Batch { } private void startBatch() { - Module bootstrapModule = new BootstrapModule(projectReactor, components.toArray(new Object[components.size()])).init(); + Module bootstrapModule = null; try { + bootstrapModule = new BootstrapModule(projectReactor, components.toArray(new Object[components.size()])).init(); bootstrapModule.start(); } catch (RuntimeException e) { PicoUtils.propagateStartupException(e); } finally { try { - bootstrapModule.stop(); + if (bootstrapModule != null) { + bootstrapModule.stop(); + } } catch (Exception e) { // never throw exceptions in a finally block LoggerFactory.getLogger(Batch.class).error("Error while stopping batch", e); |