]> source.dussan.org Git - sonarqube.git/commitdiff
Update warning when a unknown Characteristic is found on a rule
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 23 Jan 2015 14:22:42 +0000 (15:22 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 23 Jan 2015 14:32:05 +0000 (15:32 +0100)
server/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java

index 46609a8b6bd4db4fd244ba724f7b0915c2f6338e..8f123326ed483fc1bceb71bc46b1d8248b4859d7 100644 (file)
@@ -52,12 +52,7 @@ import org.sonar.server.startup.RegisterDebtModel;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import static com.google.common.collect.Lists.newArrayList;
 
@@ -180,7 +175,7 @@ public class RegisterRules implements Startable {
     if (characteristicDto == null) {
       // Log a warning only if rule has not been overridden by user
       if (overridingCharacteristicId == null) {
-        LOG.warn(String.format("Characteristic '%s' has not been found on rule '%s:%s'", subCharacteristic, repo, ruleKey));
+        LOG.warn(String.format("Unknown Characteristic '%s' was found on rule '%s:%s'", subCharacteristic, repo, ruleKey));
       }
     } else if (characteristicDto.getParentId() == null) {
       throw MessageException.of(String.format("Rule '%s:%s' cannot be linked on the root characteristic '%s'", repo, ruleKey, subCharacteristic));