From 43cde24fb6eb8ced9ff2ca63c7d0f84bac2fbf40 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 5 May 2015 16:05:31 +0200 Subject: [PATCH] Fix some quality flaws --- .../sonar/batch/report/TestExecutionAndCoveragePublisher.java | 2 +- .../main/java/org/sonar/batch/scan/report/RuleNameProvider.java | 2 +- 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 { + private static final class TestConverter implements Function { private final Set 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) { -- 2.39.5