From 59e9c32c20d7dd365bdca6f908545618c57567d1 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 30 May 2013 17:09:23 +0200 Subject: [PATCH] The deprecated violation api must not allow to change severity --- .../src/main/java/org/sonar/batch/index/DefaultIndex.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java index bd5fc8979b4..015d0799fb0 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java @@ -360,6 +360,11 @@ public class DefaultIndex extends SonarIndex { return; } + // keep a limitation (bug?) of deprecated violations api : severity is always + // set by sonar. The severity set by plugins is overridden. + // This is not the case with issue api. + violation.setSeverity(null); + violation.setResource(bucket.getResource()); scanIssues.initAndAddViolation(violation); } -- 2.39.5