summaryrefslogtreecommitdiffstats
path: root/controlloop/common
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-09-26 13:53:38 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-09-27 11:43:48 +0000
commit1c32e0c17febcbef90756f3eef4868542723cc81 (patch)
tree782ccd0d28a1489f347fff95d3034622e83261ff /controlloop/common
parent4c9ff34878cdc955f30e337cc8c0a2d54aaca364 (diff)
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 <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common')
-rw-r--r--controlloop/common/eventmanager/pom.xml3
-rw-r--r--controlloop/common/feature-controlloop-trans/pom.xml3
-rw-r--r--controlloop/common/guard/checkstyle-suppressions.xml2
-rw-r--r--controlloop/common/guard/pom.xml3
-rw-r--r--controlloop/common/model-impl/sdnr/pom.xml3
-rw-r--r--controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java2
-rw-r--r--controlloop/common/policy-yaml/checkstyle-suppressions.xml30
-rw-r--r--controlloop/common/policy-yaml/pom.xml4
-rw-r--r--controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java3
-rw-r--r--controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java2
-rw-r--r--controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java4
11 files changed, 44 insertions, 15 deletions
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 -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
<excludes>
</excludes>
+ <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<failsOnViolation>true</failsOnViolation>
<violationSeverity>warning</violationSeverity>
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 -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
<excludes>
</excludes>
+ <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<failsOnViolation>true</failsOnViolation>
<violationSeverity>warning</violationSeverity>
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 @@
<suppressions>
<suppress checks="AbbreviationAsWordInName"
- files="PNFTargetLock.java|VNFTargetLock.java|VMTargetLock.java|PolicyGuardRequest.java|PolicyGuardResponse.java|PolicyGuardXacmlHelper.java|TargetLock.java"
+ files="PNFTargetLock.java|VNFTargetLock.java|VMTargetLock.java|PolicyGuardRequest.java|PolicyGuardResponse.java|PolicyGuardXacmlHelper.java|TargetLock.java|PolicyGuardXacmlRequestAttributes.java"
lines="1-9999"/>
</suppressions>
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 -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
<excludes>
</excludes>
+ <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<failsOnViolation>true</failsOnViolation>
<violationSeverity>warning</violationSeverity>
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 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
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 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2018 AT&T Technologies. 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="AbbreviationAsWordInName"
+ files="ControlLoopCompiler.java|Target.java|ControlLoopPolicyBuilder.java"
+ lines="1-9999"/>
+</suppressions>
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 -->
<configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
<!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
<includeResources>true</includeResources>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<includeTestResources>true</includeTestResources>
<excludes>
</excludes>
+ <suppressionsLocation>${project.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<failsOnViolation>true</failsOnViolation>
<violationSeverity>warning</violationSeverity>
@@ -127,5 +128,4 @@
</plugin>
</plugins>
</build>
-
</project>
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<String, String> activeTimeRange) {