From 1c32e0c17febcbef90756f3eef4868542723cc81 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Wed, 26 Sep 2018 13:53:38 -0400 Subject: Fix for checkstyle declarations I found the problem with policy-yaml. An exception was occuring due to an extra line between an @return for javadoc vs. just printing a warning. See: https://github.com/checkstyle/checkstyle/issues/2398 I also messed up some of the other declarations in the sub-modules. Copyright Issue-ID: POLICY-1153 Change-Id: I848e0b19340d494775e161bab86ffb60a97d83ab Signed-off-by: Pamela Dragosh --- controlloop/common/eventmanager/pom.xml | 3 ++- .../common/feature-controlloop-trans/pom.xml | 3 ++- .../common/guard/checkstyle-suppressions.xml | 2 +- controlloop/common/guard/pom.xml | 3 ++- controlloop/common/model-impl/sdnr/pom.xml | 3 +-- .../onap/policy/sdnr/TestPciResponseWrapper.java | 2 -- .../common/policy-yaml/checkstyle-suppressions.xml | 30 ++++++++++++++++++++++ controlloop/common/policy-yaml/pom.xml | 4 +-- .../controlloop/compiler/ControlLoopCompiler.java | 3 +-- .../policy/builder/ControlLoopPolicyBuilder.java | 2 +- .../controlloop/policy/guard/Constraint.java | 4 +-- 11 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 controlloop/common/policy-yaml/checkstyle-suppressions.xml diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml index e14d62ffc..51a394b11 100644 --- a/controlloop/common/eventmanager/pom.xml +++ b/controlloop/common/eventmanager/pom.xml @@ -222,12 +222,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory}/src/main/java + ${project.build.sourceDirectory} true true true + ${project.basedir}/checkstyle-suppressions.xml true true warning diff --git a/controlloop/common/feature-controlloop-trans/pom.xml b/controlloop/common/feature-controlloop-trans/pom.xml index 2e609d0ed..1551a5c28 100644 --- a/controlloop/common/feature-controlloop-trans/pom.xml +++ b/controlloop/common/feature-controlloop-trans/pom.xml @@ -99,12 +99,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory}/src/main/java + ${project.build.sourceDirectory} true true true + ${project.basedir}/checkstyle-suppressions.xml true true warning diff --git a/controlloop/common/guard/checkstyle-suppressions.xml b/controlloop/common/guard/checkstyle-suppressions.xml index 9b071df87..7893c0b7d 100644 --- a/controlloop/common/guard/checkstyle-suppressions.xml +++ b/controlloop/common/guard/checkstyle-suppressions.xml @@ -25,6 +25,6 @@ diff --git a/controlloop/common/guard/pom.xml b/controlloop/common/guard/pom.xml index 08e403e41..a76f4b30c 100644 --- a/controlloop/common/guard/pom.xml +++ b/controlloop/common/guard/pom.xml @@ -124,12 +124,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory}/src/main/java + ${project.build.sourceDirectory} true true true + ${project.basedir}/checkstyle-suppressions.xml true true warning diff --git a/controlloop/common/model-impl/sdnr/pom.xml b/controlloop/common/model-impl/sdnr/pom.xml index de67a4d96..81c04ae48 100644 --- a/controlloop/common/model-impl/sdnr/pom.xml +++ b/controlloop/common/model-impl/sdnr/pom.xml @@ -3,6 +3,7 @@ Drools PDP Application Models ================================================================================ Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved. + Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -33,13 +34,11 @@ junit junit - 4.12 test com.google.code.gson gson - 2.5 provided diff --git a/controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java b/controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java index d48fd39b8..2472d31c3 100644 --- a/controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java +++ b/controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java @@ -26,8 +26,6 @@ import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import com.google.gson.Gson; - import org.junit.Test; public class TestPciResponseWrapper { diff --git a/controlloop/common/policy-yaml/checkstyle-suppressions.xml b/controlloop/common/policy-yaml/checkstyle-suppressions.xml new file mode 100644 index 000000000..a23b257a6 --- /dev/null +++ b/controlloop/common/policy-yaml/checkstyle-suppressions.xml @@ -0,0 +1,30 @@ + + + + + + + + diff --git a/controlloop/common/policy-yaml/pom.xml b/controlloop/common/policy-yaml/pom.xml index b48e74d67..6594817ef 100644 --- a/controlloop/common/policy-yaml/pom.xml +++ b/controlloop/common/policy-yaml/pom.xml @@ -104,12 +104,13 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory}/src/main/java + ${project.build.sourceDirectory} true true true + ${project.basedir}/checkstyle-suppressions.xml true true warning @@ -127,5 +128,4 @@ - diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java index 45ff1847b..76c6f8f14 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java @@ -74,8 +74,7 @@ public class ControlLoopCompiler implements Serializable { * * @param yamlSpecification the yaml input stream * @param callback method to callback during compilation - * @return - * + * @return Control Loop object * @throws CompilerException throws any compile exception found */ public static ControlLoopPolicy compile(InputStream yamlSpecification, diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java index 9d00793b9..8ea33d5f0 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java @@ -235,7 +235,7 @@ public interface ControlLoopPolicyBuilder { /** * Removes all existing Operational Policies and reverts back to an Open Loop. * - * @return + * @return Policy builder object */ public ControlLoopPolicyBuilder removeAllPolicies(); diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java index b54e2f665..5ac1fdc91 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java @@ -55,8 +55,8 @@ public class Constraint { /** * Constructor. * - * @param minVNFLimit minimum VNF count - * @param maxVNFLimit maximum VNF count + * @param minVnfCount minimum VNF count + * @param maxVnfCount maximum VNF count * @param activeTimeRange active time range */ public Constraint(Integer minVnfCount, Integer maxVnfCount, Map activeTimeRange) { -- cgit 1.2.3-korg