diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-01-16 11:31:46 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-01-16 11:31:59 +0100 |
commit | b9970607d50b8de81b6a43fd00f373f37989423c (patch) | |
tree | edfd242d230ba2cd5ace0df817b0f0efb2c2dd6a /sonar-plugin-api | |
parent | f5e00efa3bab2bbe4b6e6f602ac1ccd381eeab91 (diff) | |
download | sonarqube-b9970607d50b8de81b6a43fd00f373f37989423c.tar.gz sonarqube-b9970607d50b8de81b6a43fd00f373f37989423c.zip |
SONAR-4908 support deprecated param type REGULAR_EXPRESSION
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleParamType.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleParamTypeTest.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleParamType.java b/sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleParamType.java index 953962c5fc2..198ba4d072d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleParamType.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rule/RuleParamType.java @@ -81,7 +81,7 @@ public final class RuleParamType { if ("i".equals(s) || "i{}".equals(s)) { return INTEGER; } - if ("s".equals(s) || "s{}".equals(s) || "r".equals(s)) { + if ("s".equals(s) || "s{}".equals(s) || "r".equals(s) || "REGULAR_EXPRESSION".equals(s)) { return STRING; } if ("b".equals(s)) { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleParamTypeTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleParamTypeTest.java index b4da1f21274..0df7557487e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleParamTypeTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/rule/RuleParamTypeTest.java @@ -85,6 +85,7 @@ public class RuleParamTypeTest { assertThat(RuleParamType.parse("r")).isEqualTo(RuleParamType.STRING); assertThat(RuleParamType.parse("TEXT")).isEqualTo(RuleParamType.TEXT); assertThat(RuleParamType.parse("STRING")).isEqualTo(RuleParamType.STRING); + assertThat(RuleParamType.parse("REGULAR_EXPRESSION")).isEqualTo(RuleParamType.STRING); RuleParamType list = RuleParamType.parse("s[FOO,BAR]"); assertThat(list.type()).isEqualTo("SINGLE_SELECT_LIST"); assertThat(list.options()).containsOnly("FOO", "BAR"); |