Fix for checkstyle declarations 53/69153/3
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 26 Sep 2018 17:53:38 +0000 (13:53 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Thu, 27 Sep 2018 11:43:48 +0000 (11:43 +0000)
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>
controlloop/common/eventmanager/pom.xml
controlloop/common/feature-controlloop-trans/pom.xml
controlloop/common/guard/checkstyle-suppressions.xml
controlloop/common/guard/pom.xml
controlloop/common/model-impl/sdnr/pom.xml
controlloop/common/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/TestPciResponseWrapper.java
controlloop/common/policy-yaml/checkstyle-suppressions.xml [new file with mode: 0644]
controlloop/common/policy-yaml/pom.xml
controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java
controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/ControlLoopPolicyBuilder.java
controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java

index e14d62f..51a394b 100644 (file)
                             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>
index 2e609d0..1551a5c 100644 (file)
                             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>
index 9b071df..7893c0b 100644 (file)
@@ -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>
index 08e403e..a76f4b3 100644 (file)
                             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>
index de67a4d..81c04ae 100644 (file)
@@ -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.
     <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>
index d48fd39..2472d31 100644 (file)
@@ -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 (file)
index 0000000..a23b257
--- /dev/null
@@ -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>
index b48e74d..6594817 100644 (file)
                             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>
             </plugin>
         </plugins>
     </build>
-
 </project>
index 45ff184..76c6f8f 100644 (file)
@@ -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, 
index 9d00793..8ea33d5 100644 (file)
@@ -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();
 
index b54e2f6..5ac1fdc 100644 (file)
@@ -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) {