diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-07 15:51:47 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-07 15:53:36 +0200 |
commit | 2354a1598072700ef24fb5d41ab26d82f383fb6b (patch) | |
tree | 8e09b8eb4f5a87201aa1d3ec0c8c85d8564a5c15 /plugins | |
parent | 92e5bdd660471c84b8251e7f796f0243ba83e0c2 (diff) | |
download | sonarqube-2354a1598072700ef24fb5d41ab26d82f383fb6b.tar.gz sonarqube-2354a1598072700ef24fb5d41ab26d82f383fb6b.zip |
Fix quality flaws
Diffstat (limited to 'plugins')
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java index 41973ea7239..25c5d0942bf 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/AbstractCoverageDecorator.java @@ -43,13 +43,13 @@ public abstract class AbstractCoverageDecorator implements Decorator { } public void decorate(final Resource resource, final DecoratorContext context) { - if (shouldDecorate(resource, context)) { + if (shouldDecorate(resource)) { computeMeasure(context); computeMeasureForNewCode(context); } } - protected boolean shouldDecorate(final Resource resource, final DecoratorContext context) { + protected boolean shouldDecorate(final Resource resource) { return !ResourceUtils.isUnitTestClass(resource); } diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java index 3423b73ee21..a79c13b6df1 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/UnitTestDecorator.java @@ -45,12 +45,12 @@ public class UnitTestDecorator implements Decorator { return !Project.AnalysisType.STATIC.equals(project.getAnalysisType()); } - public boolean shouldDecorateResource(Resource resource, DecoratorContext context) { + public boolean shouldDecorateResource(Resource resource) { return ResourceUtils.isUnitTestClass(resource) || !ResourceUtils.isEntity(resource); } public void decorate(Resource resource, DecoratorContext context) { - if (shouldDecorateResource(resource, context)) { + if (shouldDecorateResource(resource)) { sumChildren(context, CoreMetrics.TEST_EXECUTION_TIME); sumChildren(context, CoreMetrics.SKIPPED_TESTS); Double tests = sumChildren(context, CoreMetrics.TESTS); |