aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-23 09:42:36 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-23 09:43:03 +0100
commiteb958e64cf79c3279fd78f5d2377230f87a77053 (patch)
treead2a59a627b62174a3dd1eb643e1788555345cdb /sonar-batch
parent20784abd0d34a202a39151e525e3d31c66705f21 (diff)
downloadsonarqube-eb958e64cf79c3279fd78f5d2377230f87a77053.tar.gz
sonarqube-eb958e64cf79c3279fd78f5d2377230f87a77053.zip
Fix some quality flaws.
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java4
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/tasks/Tasks.java4
3 files changed, 8 insertions, 4 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
index 0987d020216..0131e8b59e9 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
@@ -47,7 +47,7 @@ public class BatchSettings extends Settings {
this(bootstrapSettings, propertyDefinitions, null, client, deprecatedConfiguration, globalProperties);
}
- public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefinitions propertyDefinitions, ProjectReactor reactor,
+ public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefinitions propertyDefinitions, @Nullable ProjectReactor reactor,
ServerClient client, Configuration deprecatedConfiguration, GlobalBatchProperties globalProperties) {
super(propertyDefinitions);
this.deprecatedConfiguration = deprecatedConfiguration;
@@ -58,7 +58,7 @@ public class BatchSettings extends Settings {
BatchSettings() {
}
- private void init(BootstrapSettings bootstrapSettings, ProjectReactor reactor, ServerClient client,
+ private void init(BootstrapSettings bootstrapSettings, @Nullable ProjectReactor reactor, ServerClient client,
GlobalBatchProperties globalProperties) {
LoggerFactory.getLogger(BatchSettings.class).info("Load batch settings");
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java
index 052d9a07931..5db5fcf3454 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/TaskBootstrapModule.java
@@ -26,6 +26,8 @@ import org.sonar.batch.tasks.InspectionTask;
import org.sonar.batch.tasks.ListTasksTask;
import org.sonar.batch.tasks.Tasks;
+import javax.annotation.Nullable;
+
/**
* Level-2 components. Collect tasks definitions.
*/
@@ -33,7 +35,7 @@ public class TaskBootstrapModule extends Module {
private String taskCommand;
- public TaskBootstrapModule(String taskCommand) {
+ public TaskBootstrapModule(@Nullable String taskCommand) {
this.taskCommand = taskCommand;
}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/tasks/Tasks.java b/sonar-batch/src/main/java/org/sonar/batch/tasks/Tasks.java
index 8e5b8698eb4..9ff56cdd9ba 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/tasks/Tasks.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/tasks/Tasks.java
@@ -29,6 +29,8 @@ import org.sonar.api.task.TaskComponent;
import org.sonar.api.task.TaskDefinition;
import org.sonar.api.utils.SonarException;
+import javax.annotation.Nullable;
+
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
@@ -49,7 +51,7 @@ public class Tasks implements TaskComponent {
this.taskDefinitions = taskDefinitions;
}
- public TaskDefinition getTaskDefinition(String command) {
+ public TaskDefinition getTaskDefinition(@Nullable String command) {
String finalCommand = command;
if (StringUtils.isBlank(finalCommand)) {
// Try with a property