From fa8406f747589de519a6ba1c75e1e8ee64365b52 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 23 Jan 2015 15:22:42 +0100 Subject: [PATCH] Update warning when a unknown Characteristic is found on a rule --- .../main/java/org/sonar/server/rule/RegisterRules.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java b/server/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java index 46609a8b6bd..8f123326ed4 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java @@ -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)); -- 2.39.5