aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-runner-api/src/main/java/org/sonar/runner
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-04-07 17:12:26 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-04-07 17:12:26 +0200
commita9bf502a052d2edc80526521de7407b43d751973 (patch)
tree09a572f4ac43a467c040efd332366942036290d1 /sonar-runner-api/src/main/java/org/sonar/runner
parent20f838228f687a6f6cddc79838956601b23a229c (diff)
downloadsonar-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')
-rw-r--r--sonar-runner-api/src/main/java/org/sonar/runner/api/ForkedRunner.java3
-rw-r--r--sonar-runner-api/src/main/java/org/sonar/runner/api/RunnerVersion.java9
-rw-r--r--sonar-runner-api/src/main/java/org/sonar/runner/api/package-info.java3
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;
+