From c7b4ec962ce342dbe9993ada51b7360055acbd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 1 Dec 2020 20:17:32 +0100 Subject: [PATCH] Checkstyle --- .../pmd/lang/java/metrics/impl/AtfdTestRule.java | 2 -- .../pmd/lang/java/metrics/impl/NcssTestRule.java | 6 +++--- .../pmd/test/AbstractMetricTestRule.java | 14 +++++++------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/AtfdTestRule.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/AtfdTestRule.java index 9bb1863364..78f6fd0e4e 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/AtfdTestRule.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/AtfdTestRule.java @@ -5,8 +5,6 @@ package net.sourceforge.pmd.lang.java.metrics.impl; import net.sourceforge.pmd.lang.ast.Node; -import net.sourceforge.pmd.lang.java.ast.ASTAnyTypeDeclaration; -import net.sourceforge.pmd.lang.java.ast.ASTMethodOrConstructorDeclaration; import net.sourceforge.pmd.lang.java.metrics.api.JavaMetrics; /** diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/NcssTestRule.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/NcssTestRule.java index ca9c69d68f..33d124bced 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/NcssTestRule.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/metrics/impl/NcssTestRule.java @@ -20,21 +20,21 @@ import net.sourceforge.pmd.properties.PropertyFactory; */ public class NcssTestRule extends JavaIntMetricTestRule { - static final PropertyDescriptor reportClasses = + static final PropertyDescriptor REPORT_CLASSES = PropertyFactory.booleanProperty("reportClasses") .desc("...") .defaultValue(false).build(); public NcssTestRule() { super(JavaMetrics.NCSS); - definePropertyDescriptor(reportClasses); + definePropertyDescriptor(REPORT_CLASSES); } @Override protected boolean reportOn(Node node) { return super.reportOn(node) && (node instanceof ASTMethodOrConstructorDeclaration - || getProperty(reportClasses) && node instanceof ASTAnyTypeDeclaration); + || getProperty(REPORT_CLASSES) && node instanceof ASTAnyTypeDeclaration); } @Override diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/AbstractMetricTestRule.java b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/AbstractMetricTestRule.java index 580db93bf0..9aa2c782f5 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/AbstractMetricTestRule.java +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/AbstractMetricTestRule.java @@ -116,9 +116,9 @@ public abstract class AbstractMetricTestRule> e } } - public abstract static class OfDouble extends AbstractMetricTestRule { + public abstract static class OfDouble extends AbstractMetricTestRule { - protected OfDouble(Metric metric) { + protected OfDouble(Metric metric) { super(metric); } @@ -127,10 +127,10 @@ public abstract class AbstractMetricTestRule> e return Double.parseDouble(value); } - @Override - protected Double defaultReportLevel() { - return 0.; - } - } + @Override + protected Double defaultReportLevel() { + return 0.; + } + } }