]> source.dussan.org Git - sonarqube.git/commitdiff
The deprecated violation api must not allow to change severity
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 30 May 2013 15:09:23 +0000 (17:09 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 30 May 2013 15:10:37 +0000 (17:10 +0200)
sonar-batch/src/main/java/org/sonar/batch/index/DefaultIndex.java

index bd5fc8979b4a7a41a99ad3243afea1c9930110db..015d0799fb04a3495ed7d80a5615f5579d3641e6 100644 (file)
@@ -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);
   }