aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-04-03 18:13:34 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-04-03 18:13:34 +0200
commit33080cbd8883a540a0e366923d47ebbfb2683984 (patch)
treebfefb15d3a02137ee1529b06a4ecd0c5beb26396 /sonar-plugin-api
parent533766d1cf443450a708c8cd1418921c9246f354 (diff)
downloadsonarqube-33080cbd8883a540a0e366923d47ebbfb2683984.tar.gz
sonarqube-33080cbd8883a540a0e366923d47ebbfb2683984.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java9
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/component/mock/MockSourceFile.java6
2 files changed, 7 insertions, 8 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
index 1df8ecfc4bf..62c4da3d653 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectDefinition.java
@@ -23,6 +23,9 @@ import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+
import java.io.File;
import java.util.List;
import java.util.Properties;
@@ -80,20 +83,22 @@ public class ProjectDefinition {
return baseDir;
}
- public ProjectDefinition setWorkDir(File workDir) {
+ public ProjectDefinition setWorkDir(@Nullable File workDir) {
this.workDir = workDir;
return this;
}
+ @CheckForNull
public File getWorkDir() {
return workDir;
}
- public ProjectDefinition setBuildDir(File d) {
+ public ProjectDefinition setBuildDir(@Nullable File d) {
this.buildDir = d;
return this;
}
+ @CheckForNull
public File getBuildDir() {
return buildDir;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/component/mock/MockSourceFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/component/mock/MockSourceFile.java
index 1c6e70a7863..61422d00169 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/component/mock/MockSourceFile.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/component/mock/MockSourceFile.java
@@ -24,7 +24,6 @@ import org.sonar.api.component.SourceFile;
public class MockSourceFile implements SourceFile {
private String key;
private String path;
- private String moduleKey;
private String qualifier;
private String language;
private String name;
@@ -52,11 +51,6 @@ public class MockSourceFile implements SourceFile {
return this;
}
- public MockSourceFile setModuleKey(String moduleKey) {
- this.moduleKey = moduleKey;
- return this;
- }
-
public String qualifier() {
return qualifier;
}