diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-24 17:36:33 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-24 17:36:41 +0100 |
commit | d8f2360119b30bd3f65e60baa022e0457176cec9 (patch) | |
tree | e87d58eb07ecbf12b021fd45273d3eaf780bc08e /sonar-plugin-api/src/main/java/org/sonar | |
parent | fb0bca80597dc923ae633d2d34ee42885883c07c (diff) | |
download | sonarqube-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.java | 8 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/server/rule/RuleDefinitions.java | 4 |
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; |