aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java/org/sonar
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-02-24 17:36:33 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-02-24 17:36:41 +0100
commitd8f2360119b30bd3f65e60baa022e0457176cec9 (patch)
treee87d58eb07ecbf12b021fd45273d3eaf780bc08e /sonar-plugin-api/src/main/java/org/sonar
parentfb0bca80597dc923ae633d2d34ee42885883c07c (diff)
downloadsonarqube-d8f2360119b30bd3f65e60baa022e0457176cec9.tar.gz
sonarqube-d8f2360119b30bd3f65e60baa022e0457176cec9.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java4
2 files changed, 2 insertions, 10 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java
index 6a21a8d6c15..c78be2ea246 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultFileSystem.java
@@ -66,11 +66,7 @@ public class DefaultFileSystem implements FileSystem {
return this;
}
- /**
- * Marked as nullable only for the tests that do not call {@link #setBaseDir(java.io.File)}
- */
@Override
- @CheckForNull
public File baseDir() {
return baseDir;
}
@@ -98,11 +94,7 @@ public class DefaultFileSystem implements FileSystem {
return this;
}
- /**
- * Marked as nullable only for the tests that do not call {@link #setWorkDir(java.io.File)}
- */
@Override
- @CheckForNull
public File workDir() {
return workDir;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java
index 8eeb31be412..596982289ba 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java
@@ -322,7 +322,7 @@ public interface RuleDefinitions extends ServerExtension {
return this.key;
}
- public NewRule setName(String s) {
+ public NewRule setName(@Nullable String s) {
this.name = StringUtils.trim(s);
return this;
}
@@ -353,7 +353,7 @@ public interface RuleDefinitions extends ServerExtension {
try {
setHtmlDescription(IOUtils.toString(classpathUrl));
} catch (IOException e) {
- throw new IllegalStateException("Fail to read: " + classpathUrl);
+ throw new IllegalStateException("Fail to read: " + classpathUrl, e);
}
} else {
this.htmlDescription = null;