aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-07-24 09:28:10 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-07-24 09:29:02 +0200
commit7b9679e8749287b46b195464a22fbd751dbf5cf3 (patch)
tree93d567ab9bdca2a82710a85144a6112fe6f3ae1d /sonar-batch
parente55403cbaa10eedf405ed8eb9d10a44417d476f8 (diff)
downloadsonarqube-7b9679e8749287b46b195464a22fbd751dbf5cf3.tar.gz
sonarqube-7b9679e8749287b46b195464a22fbd751dbf5cf3.zip
SONAR-5389 Do not expose rule name in active rule as we may drop it soon
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan2/DefaultSensorContext.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/DefaultSensorContext.java b/sonar-batch/src/main/java/org/sonar/batch/scan2/DefaultSensorContext.java
index f54dab6af55..6f4b2bdec70 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan2/DefaultSensorContext.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan2/DefaultSensorContext.java
@@ -24,8 +24,8 @@ import org.sonar.api.batch.bootstrap.ProjectDefinition;
import org.sonar.api.batch.fs.FileSystem;
import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.measure.Metric;
-import org.sonar.api.batch.rule.ActiveRule;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.internal.DefaultActiveRule;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.issue.Issue;
import org.sonar.api.batch.sensor.issue.IssueBuilder;
@@ -128,7 +128,7 @@ public class DefaultSensorContext implements SensorContext {
resourceKey = def.getKey();
}
RuleKey ruleKey = issue.ruleKey();
- ActiveRule activeRule = activeRules.find(ruleKey);
+ DefaultActiveRule activeRule = (DefaultActiveRule) activeRules.find(ruleKey);
if (activeRule == null) {
// rule does not exist or is not enabled -> ignore the issue
return false;
@@ -147,7 +147,7 @@ public class DefaultSensorContext implements SensorContext {
return false;
}
- private void updateIssue(DefaultIssue issue, ActiveRule activeRule) {
+ private void updateIssue(DefaultIssue issue, DefaultActiveRule activeRule) {
if (Strings.isNullOrEmpty(issue.message())) {
issue.setMessage(activeRule.name());
}