]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4908 Param name is never null
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 8 Jan 2014 23:40:01 +0000 (00:40 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 8 Jan 2014 23:40:01 +0000 (00:40 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleDefinitions.java

index ff570e72f6140b1f55a68f7727569c93069f6b81..a76fba20722a7fe59960a64092712fcfa442e21b 100644 (file)
@@ -327,8 +327,9 @@ public interface RuleDefinitions extends ServerExtension {
       return name;
     }
 
-    public NewParam setName(String s) {
-      this.name = s;
+    public NewParam setName(@Nullable String s) {
+      // name must never be null.
+      this.name = StringUtils.defaultIfBlank(s, key);
       return this;
     }