summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-05-05 16:05:31 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-05-05 16:05:31 +0200
commit43cde24fb6eb8ced9ff2ca63c7d0f84bac2fbf40 (patch)
tree5d0f4909c6ad6799e237b1ded107c301bc6d0945
parentcc181b8b100ffe35424217bfcb07f946938d32f0 (diff)
downloadsonarqube-43cde24fb6eb8ced9ff2ca63c7d0f84bac2fbf40.tar.gz
sonarqube-43cde24fb6eb8ced9ff2ca63c7d0f84bac2fbf40.zip
Fix some quality flaws
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java b/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java
index 84358102b78..9144de126bf 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/report/TestExecutionAndCoveragePublisher.java
@@ -41,7 +41,7 @@ import java.util.Set;
public class TestExecutionAndCoveragePublisher implements ReportPublisherStep {
- private final class TestConverter implements Function<MutableTestCase, BatchReport.Test> {
+ private static final class TestConverter implements Function<MutableTestCase, BatchReport.Test> {
private final Set<String> testNamesWithCoverage;
private BatchReport.Test.Builder builder = BatchReport.Test.newBuilder();
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java b/sonar-batch/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java
index 80b3ea91fc8..6828fca449d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java
@@ -47,7 +47,7 @@ public class RuleNameProvider implements BatchComponent {
public String nameForJS(String ruleKey) {
String name = nameFromDB(RuleKey.parse(ruleKey));
- return StringEscapeUtils.escapeJavaScript(name != null ? name : ruleKey.toString());
+ return StringEscapeUtils.escapeJavaScript(name != null ? name : ruleKey);
}
public String nameForHTML(Rule rule) {