aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch-protocol
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-07-29 10:34:22 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-07-30 13:18:19 +0200
commit68f92a7ff96e2da6cbfecb38b832e5bf12701b49 (patch)
tree7f0e336d992066263c0e1f6d6c2339aaa25cdd44 /sonar-batch-protocol
parenta8e0cd5ca6e87caa32c0528920151ad22f9a9bc7 (diff)
downloadsonarqube-68f92a7ff96e2da6cbfecb38b832e5bf12701b49.tar.gz
sonarqube-68f92a7ff96e2da6cbfecb38b832e5bf12701b49.zip
SONAR-6750 Support new SQ Runner API for retrieving issues
Diffstat (limited to 'sonar-batch-protocol')
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Rule.java25
-rw-r--r--sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/RulesSearchResultTest.java4
2 files changed, 3 insertions, 26 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Rule.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Rule.java
index e1574f1c6be..8f71f3ff00a 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Rule.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/Rule.java
@@ -19,24 +19,17 @@
*/
package org.sonar.batch.protocol.input;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
public class Rule {
private final String key;
private final String repo;
private final String internalKey;
private final String name;
- private final String severity;
- private final String lang;
- public Rule(String ruleKey, String repositoryKey, String internalKey, String name, @Nullable String severity, @Nullable String language) {
+ public Rule(String ruleKey, String repositoryKey, String internalKey, String name) {
this.key = ruleKey;
this.repo = repositoryKey;
this.internalKey = internalKey;
this.name = name;
- this.severity = severity;
- this.lang = language;
}
public String ruleKey() {
@@ -55,20 +48,4 @@ public class Rule {
return name;
}
- /**
- * Is null on manual rules
- */
- @CheckForNull
- public String severity() {
- return severity;
- }
-
- /**
- * Is null on manual rules
- */
- @CheckForNull
- public String language() {
- return lang;
- }
-
}
diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/RulesSearchResultTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/RulesSearchResultTest.java
index 0455cc2eeb1..0781a69b78f 100644
--- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/RulesSearchResultTest.java
+++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/RulesSearchResultTest.java
@@ -33,9 +33,9 @@ import org.junit.Test;
public class RulesSearchResultTest {
@Test
public void testJsonParsing() {
- Rule rule1 = new Rule("squid:S1194", "squid", "S1194", "\"java.lang.Error\" should not be extended", "MAJOR", "java");
+ Rule rule1 = new Rule("squid:S1194", "squid", "S1194", "\"java.lang.Error\" should not be extended");
Rule rule2 = new Rule("squid:ObjectFinalizeOverridenCallsSuperFinalizeCheck", "squid", "ObjectFinalizeOverridenCallsSuperFinalizeCheck",
- "super.finalize() should be called at the end of Object.finalize() implementations", "BLOCKER", "java");
+ "super.finalize() should be called at the end of Object.finalize() implementations");
RulesSearchResult rules = new RulesSearchResult();
rules.setRules(Lists.newArrayList(rule1, rule2));