diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-04-07 17:12:26 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-04-07 17:12:26 +0200 |
commit | a9bf502a052d2edc80526521de7407b43d751973 (patch) | |
tree | 09a572f4ac43a467c040efd332366942036290d1 /sonar-runner-api/src/main/java/org/sonar/runner | |
parent | 20f838228f687a6f6cddc79838956601b23a229c (diff) | |
download | sonar-scanner-cli-a9bf502a052d2edc80526521de7407b43d751973.tar.gz sonar-scanner-cli-a9bf502a052d2edc80526521de7407b43d751973.zip |
Fix some quality flaws and update coverage
Diffstat (limited to 'sonar-runner-api/src/main/java/org/sonar/runner')
3 files changed, 8 insertions, 7 deletions
diff --git a/sonar-runner-api/src/main/java/org/sonar/runner/api/ForkedRunner.java b/sonar-runner-api/src/main/java/org/sonar/runner/api/ForkedRunner.java index 9dff8ed..02ae333 100644 --- a/sonar-runner-api/src/main/java/org/sonar/runner/api/ForkedRunner.java +++ b/sonar-runner-api/src/main/java/org/sonar/runner/api/ForkedRunner.java @@ -194,8 +194,7 @@ public class ForkedRunner extends Runner<ForkedRunner> { if (status != 0) { if (processMonitor != null && processMonitor.stop()) { stdOut.consumeLine(String.format("SonarQube Runner was stopped [status=%s]", status)); - } - else { + } else { throw new IllegalStateException("Error status [command: " + forkCommand.command + "]: " + status); } } diff --git a/sonar-runner-api/src/main/java/org/sonar/runner/api/RunnerVersion.java b/sonar-runner-api/src/main/java/org/sonar/runner/api/RunnerVersion.java index e5a52c7..2aa3b97 100644 --- a/sonar-runner-api/src/main/java/org/sonar/runner/api/RunnerVersion.java +++ b/sonar-runner-api/src/main/java/org/sonar/runner/api/RunnerVersion.java @@ -32,10 +32,6 @@ public enum RunnerVersion { private String version; - public static String version() { - return INSTANCE.version; - } - private RunnerVersion() { Scanner scanner = new Scanner(getClass().getResourceAsStream("/org/sonar/runner/api/version.txt"), "UTF-8"); try { @@ -44,4 +40,9 @@ public enum RunnerVersion { scanner.close(); } } + + public static String version() { + return INSTANCE.version; + } + } diff --git a/sonar-runner-api/src/main/java/org/sonar/runner/api/package-info.java b/sonar-runner-api/src/main/java/org/sonar/runner/api/package-info.java index b12772c..cebd22d 100644 --- a/sonar-runner-api/src/main/java/org/sonar/runner/api/package-info.java +++ b/sonar-runner-api/src/main/java/org/sonar/runner/api/package-info.java @@ -20,4 +20,5 @@ @ParametersAreNonnullByDefault package org.sonar.runner.api; -import javax.annotation.ParametersAreNonnullByDefault;
\ No newline at end of file +import javax.annotation.ParametersAreNonnullByDefault; + |