summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-09-16 09:22:54 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-09-16 09:22:54 +0000
commit11cd0a981e8ea5c00170ae4eb929e636dee0ca7e (patch)
treee50f520bed155c00d2c03f0234883b4dddbeb8f4
parentaf671ec593977add8ea924b4f9f88302bd0ef81c (diff)
downloadsonarqube-11cd0a981e8ea5c00170ae4eb929e636dee0ca7e.tar.gz
sonarqube-11cd0a981e8ea5c00170ae4eb929e636dee0ca7e.zip
Default XML format to define rules : add the property <defaultValue> to <param> nodes
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/rules/StandardRuleXmlFormat.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/StandardRuleXmlFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/StandardRuleXmlFormat.java
index 1437f8baa1d..9e56a4e1276 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/StandardRuleXmlFormat.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/StandardRuleXmlFormat.java
@@ -29,11 +29,11 @@ import org.codehaus.staxmate.in.SMHierarchicCursor;
import org.codehaus.staxmate.in.SMInputCursor;
import org.sonar.api.utils.SonarException;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
/**
* @since 2.3
@@ -183,6 +183,9 @@ public final class StandardRuleXmlFormat {
} else if (StringUtils.equalsIgnoreCase("type", propNodeName)) {
param.setType(propText);
+
+ } else if (StringUtils.equalsIgnoreCase("defaultValue", propNodeName)) {
+ param.setDefaultValue(propText);
}
}
if (StringUtils.isEmpty(param.getKey())) {