From 5cd839bbecd061d9463694d025788754bfca0f08 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Fri, 10 Sep 2010 12:27:33 +0000 Subject: simplify ValidationMessages and ProfileDefinition --- .../org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/sonar-checkstyle-plugin') diff --git a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java index e397e5bbdeb..34c9ebf9301 100644 --- a/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java +++ b/plugins/sonar-checkstyle-plugin/src/main/java/org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java @@ -64,7 +64,7 @@ public class CheckstyleProfileImporter extends ProfileImporter { } } } catch (XMLStreamException e) { - messages.addError("checkstyle.import.unvalidXml", "XML is not valid: " + e.getMessage()); + messages.addErrorText("XML is not valid: " + e.getMessage()); } return profile; } @@ -82,7 +82,7 @@ public class CheckstyleProfileImporter extends ProfileImporter { private void processModule(ProfilePrototype profile, String path, SMInputCursor moduleCursor, ValidationMessages messages) throws XMLStreamException { String configKey = moduleCursor.getAttrValue("name"); if (isFilter(configKey)) { - messages.addWarning("checkstyle.import.filtersNotSupported", "Checkstyle filters are not imported: " + configKey); + messages.addWarningText("Checkstyle filters are not imported: " + configKey); } else if (isIgnored(configKey)) { @@ -115,7 +115,7 @@ public class CheckstyleProfileImporter extends ProfileImporter { String key = propertyCursor.getAttrValue("name"); String value = propertyCursor.getAttrValue("value"); if (StringUtils.equals("id", key)) { - messages.addWarning("checkstyle.import.idPropertyNotSupported", "The checkstyle property 'id' is not supported in the rule: " + rule.getConfigKey()); + messages.addWarningText("The checkstyle property 'id' is not supported in the rule: " + rule.getConfigKey()); } else if (StringUtils.equals("severity", key)) { rule.setPriority(CheckstyleSeverityUtils.fromSeverity(value)); -- cgit v1.2.3