From a0e0c7840f72392152a970d88a5a66d394c4a793 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 28 Sep 2018 04:58:26 -0400 Subject: Set drools-pdp checkstyle config Fixed last remaining checkstyle issues along with setting the pom.xml to the correct path setting. Fixed forbidden summary fragments, not allowed to prepend summary with "This method returns" Issue-ID: POLICY-1153 Change-Id: I267842080494132a7b5507731e14f027a3f6fe44 Signed-off-by: Pamela Dragosh --- policy-utils/checkstyle-suppressions.xml | 33 ++++++++++ policy-utils/pom.xml | 75 ++++++++++++++++------ .../onap/policy/drools/utils/ReflectionUtil.java | 8 +-- .../drools/utils/logging/MDCTransaction.java | 2 +- 4 files changed, 92 insertions(+), 26 deletions(-) create mode 100644 policy-utils/checkstyle-suppressions.xml (limited to 'policy-utils') diff --git a/policy-utils/checkstyle-suppressions.xml b/policy-utils/checkstyle-suppressions.xml new file mode 100644 index 00000000..cbf6eacf --- /dev/null +++ b/policy-utils/checkstyle-suppressions.xml @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/policy-utils/pom.xml b/policy-utils/pom.xml index 6a7c9fbd..03265346 100644 --- a/policy-utils/pom.xml +++ b/policy-utils/pom.xml @@ -31,23 +31,60 @@ 1.3.0-SNAPSHOT - - - - ch.qos.logback - logback-classic - - - junit - junit - test - - - org.onap.policy.common - utils - ${project.version} - - - - + + + ch.qos.logback + logback-classic + + + junit + junit + test + + + org.onap.policy.common + utils + ${project.version} + + + + + + maven-checkstyle-plugin + + + onap-java-style + + check + + process-sources + + + onap-checkstyle/onap-java-style.xml + + ${project.build.sourceDirectory} + true + true + true + + + ${project.baseUri}checkstyle-suppressions.xml + true + true + warning + + + + + + org.onap.oparent + checkstyle + ${oparent.version} + compile + + + + + diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java index f618b4c9..bb6c5428 100644 --- a/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java +++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/ReflectionUtil.java @@ -18,10 +18,6 @@ * ============LICENSE_END========================================================= */ -/** - * - */ - package org.onap.policy.drools.utils; import org.slf4j.Logger; @@ -35,7 +31,7 @@ public class ReflectionUtil { protected static final Logger logger = LoggerFactory.getLogger(ReflectionUtil.class); - private ReflectionUtil(){ + private ReflectionUtil() { } /** @@ -83,7 +79,7 @@ public class ReflectionUtil { * * @param parent superclass * @param presumedSubclass subclass - * @return + * @return true if it is a sub class */ public static boolean isSubclass(Class parent, Class presumedSubclass) { return parent.isAssignableFrom(presumedSubclass); diff --git a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MDCTransaction.java b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MDCTransaction.java index c6e78b28..61c7b0c6 100644 --- a/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MDCTransaction.java +++ b/policy-utils/src/main/java/org/onap/policy/drools/utils/logging/MDCTransaction.java @@ -336,7 +336,7 @@ public interface MDCTransaction { MDCTransaction setElapsedTime(Long elapsedTime); /** - * sets service instance id + * sets service instance id. */ MDCTransaction setServiceInstanceId(String serviceInstanceId); -- cgit 1.2.3-korg