Fix policy/common checkstyle issues 73/68473/6
authorPamela Dragosh <pdragosh@research.att.com>
Fri, 21 Sep 2018 16:48:29 +0000 (12:48 -0400)
committerPamela Dragosh <pdragosh@research.att.com>
Fri, 21 Sep 2018 18:33:06 +0000 (14:33 -0400)
The root pom.xml had a syntax error in a declaration. The suppressions
xml was not being found by the sub-modules. It was better to create a
copy in each of the sub-modules where we will not be fixing
abbreviations or the interface declarations in own java file.

Added specific checkstyle files for each submodule.

One interesting note for the InheritDoc tag. It seems that the mvn
compile has a bug that interprets these as missing a period after
the tag. Even though the parent interface has it correctly. It was
easier to just remove it than duplicate.

There are new JIRA's for that work to be done in Dublin.

Fixed some spacing in pom's.

Issue-ID: POLICY-1131
Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
28 files changed:
checkstyle-suppressions.xml [deleted file]
common-logging/checkstyle-suppressions.xml [new file with mode: 0644]
common-logging/pom.xml
common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
integrity-audit/checkstyle-suppressions.xml [new file with mode: 0644]
integrity-audit/pom.xml
policy-endpoints/checkstyle-suppressions.xml [new file with mode: 0644]
policy-endpoints/pom.xml
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/Topic.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/DmaapTopicSourceFactory.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/UebTopicSourceFactory.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusPublisher.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineBusTopicSink.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineDmaapTopicSink.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/InlineUebTopicSink.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedBusTopicSource.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedDmaapTopicSource.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/SingleThreadedUebTopicSource.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/client/internal/JerseyClient.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/HttpServletServerFactory.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/aaf/AafAuthFilter.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
policy-endpoints/src/main/java/org/onap/policy/common/endpoints/report/HealthCheckReport.java
policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpClientTest.java
pom.xml
utils-test/src/main/java/org/onap/policy/common/utils/io/Serializer.java
utils/src/main/java/org/onap/policy/common/utils/validation/ToStringTester.java

diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
deleted file mode 100644 (file)
index 2e03c64..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE suppressions PUBLIC
-     "-//Puppy Crawl//DTD Suppressions 1.0//EN"
-     "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
-<suppressions>
-  <suppress checks="AbbreviationAsWordInName"
-    files="SystemOutLoggerTest.java|Logger4JTest.java|EelfLoggerTest.java|PolicyLoggerTest.java|DroolsPDPMDCInfoTest.java|EventTrackInfoTest.java|DbDAOTest.java|HttpClientTest.java"
-    lines="1-9999"/>
-</suppressions>
diff --git a/common-logging/checkstyle-suppressions.xml b/common-logging/checkstyle-suppressions.xml
new file mode 100644 (file)
index 0000000..0d16950
--- /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="ONAPLoggingUtils.java|ONAPLoggingContext.java|DroolsPDPMDCInfo.java|Logger.java|EventData.java|EventTrackInfo.java|MDCInfo.java|PolicyLogger.java|SystemOutLoggerTest.java|Logger4JTest.java|EelfLoggerTest.java|PolicyLoggerTest.java|DroolsPDPMDCInfoTest.java|EventTrackInfoTest.java|HttpClientTest.java"
+    lines="1-9999"/>
+</suppressions>
index 143ae6b..2d3186b 100644 (file)
   ============LICENSE_END=========================================================
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-       <parent>
-               <groupId>org.onap.policy.common</groupId>
-               <artifactId>common-modules</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
-       </parent>
+    <parent>
+        <groupId>org.onap.policy.common</groupId>
+        <artifactId>common-modules</artifactId>
+        <version>1.3.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>ONAP-Logging</artifactId>
-  <description>ONAP Logging Framework</description>
-  <packaging>jar</packaging>
-  
-  <properties>
-       <powermock.version>1.6.6</powermock.version>
-  </properties>
+    <artifactId>ONAP-Logging</artifactId>
+    <description>ONAP Logging Framework</description>
+    <packaging>jar</packaging>
+
+    <properties>
+        <powermock.version>1.6.6</powermock.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+            <version>1.0.1-oss</version>
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-mockito</artifactId>
+            <version>${powermock.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
-  <dependencies>
-       <dependency>
-               <groupId>log4j</groupId>
-               <artifactId>log4j</artifactId>
-               <scope>provided</scope>
-       </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <scope>compile</scope>
-    </dependency>
-       <dependency>
-               <groupId>org.slf4j</groupId>
-               <artifactId>slf4j-api</artifactId>
-       </dependency>
-       <dependency>
-           <groupId>com.att.eelf</groupId>
-               <artifactId>eelf-core</artifactId>
-               <version>1.0.1-oss</version>
-       </dependency>
-       <dependency>
-               <groupId>org.powermock</groupId>
-               <artifactId>powermock-api-mockito</artifactId>
-               <version>${powermock.version}</version>
-               <scope>test</scope>
-       </dependency>
-  </dependencies>
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>com.att.eelf</groupId>
-                               <artifactId>eelf-maven-plugin</artifactId>
-                               <version>0.0.1</version>
-                               <executions>
-                                       <execution>
-                                               <phase>install</phase>
-                                               <goals>
-                                                       <goal>WikiMsgGenerator</goal>
-                                               </goals>
-                                       </execution>
-                               </executions>
-                               <dependencies>
-                                       <!-- We need to include the dependency of the project so that its include 
-                                               in classpath when running plugin -->
-                                       <dependency>
-                                               <groupId>org.onap.policy.common</groupId>
-                                               <artifactId>ONAP-Logging</artifactId>
-                                               <version>${project.version}</version>
-                                       </dependency>
-                               </dependencies>
-                               <configuration>
-                                       <outputDirectory>target/messages</outputDirectory>
-                                       <outputFile>messages.html</outputFile>
-                                       <resources>
-                                               <resource>
-                                                       <messageClass>org.onap.policy.common.logging.eelf.MessageCodes</messageClass>
-                                                       This needs to be replaced with your Enum class name .which
-                                                       implements EELFResolvableErrorEnum and have your defined error
-                                                       codes.
-                                                       <header><![CDATA[<p>   <ac:macro ac:name="toc" /> </p>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                    <!-- Use Google Java Style Guide:
+                    https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                    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}</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>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>com.att.eelf</groupId>
+                <artifactId>eelf-maven-plugin</artifactId>
+                <version>0.0.1</version>
+                <executions>
+                    <execution>
+                        <phase>install</phase>
+                        <goals>
+                            <goal>WikiMsgGenerator</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <!-- We need to include the dependency of the project so that its include 
+                        in classpath when running plugin -->
+                    <dependency>
+                        <groupId>org.onap.policy.common</groupId>
+                        <artifactId>ONAP-Logging</artifactId>
+                        <version>${project.version}</version>
+                    </dependency>
+                </dependencies>
+                <configuration>
+                    <outputDirectory>target/messages</outputDirectory>
+                    <outputFile>messages.html</outputFile>
+                    <resources>
+                        <resource>
+                            <messageClass>org.onap.policy.common.logging.eelf.MessageCodes</messageClass>
+                            This needs to be replaced with your Enum
+                            class name .which
+                            implements EELFResolvableErrorEnum and have your defined error
+                            codes.
+                            <header><![CDATA[<p>   <ac:macro ac:name="toc" /> </p>
                 <p>
         <ac:macro ac:name="anchor"> <ac:default-parameter>Application Messages</ac:default-parameter>  </ac:macro> </p> <h2>Application Messages</h2>]]></header>
-                                               </resource>
+                        </resource>
 
-                                       </resources>
-                               </configuration>
-                       </plugin>
-               </plugins>
-       </build>
+                    </resources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index 94d9ad4..5beef5b 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. 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.
@@ -110,7 +111,7 @@ public class GroupValidationResult implements ValidationResult {
     }
 
     /**
-     * Get the value of a field in an object using a getter found with reflection
+     * Get the value of a field in an object using a getter found with reflection.
      * 
      * @param targetObject The object on which to read the field value
      * @param fieldName The name of the field
diff --git a/integrity-audit/checkstyle-suppressions.xml b/integrity-audit/checkstyle-suppressions.xml
new file mode 100644 (file)
index 0000000..c97e4c2
--- /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="DbDAO.java|DbDAOTest.java"
+    lines="1-9999"/>
+</suppressions>
index a45dac2..a0aca29 100644 (file)
   ============LICENSE_END=========================================================
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-       <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
 
-       <artifactId>integrity-audit</artifactId>
+    <artifactId>integrity-audit</artifactId>
 
-       <packaging>jar</packaging>
+    <packaging>jar</packaging>
 
-       <parent>
-               <groupId>org.onap.policy.common</groupId>
-               <artifactId>common-modules</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
-       </parent>
+    <parent>
+        <groupId>org.onap.policy.common</groupId>
+        <artifactId>common-modules</artifactId>
+        <version>1.3.0-SNAPSHOT</version>
+    </parent>
 
-       <name>Integrity Audit</name>
+    <name>Integrity Audit</name>
 
-       <dependencies>
-               <dependency>
-                       <groupId>junit</groupId>
-                       <artifactId>junit</artifactId>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>log4j</groupId>
-                       <artifactId>log4j</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>com.h2database</groupId>
-                       <artifactId>h2</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.eclipse.persistence</groupId>
-                       <artifactId>javax.persistence</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.eclipse.persistence</groupId>
-                       <artifactId>eclipselink</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.onap.policy.common</groupId>
-                       <artifactId>utils</artifactId>
-                       <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.onap.policy.common</groupId>
-                       <artifactId>utils-test</artifactId>
-                        <version>${project.version}</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                        <groupId>org.onap.policy.common</groupId>
-                        <artifactId>ONAP-Logging</artifactId>
-                        <version>${project.version}</version>
-               </dependency>
-               <dependency>
-                        <groupId>org.apache.commons</groupId>
-                        <artifactId>commons-lang3</artifactId>
-               </dependency>
-       </dependencies>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>javax.persistence</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.persistence</groupId>
+            <artifactId>eclipselink</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>utils-test</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>ONAP-Logging</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+    </dependencies>
 
-       <build>
-               <pluginManagement>
-                       <plugins>
-                               <!--This plugin's configuration is used to store Eclipse m2e settings 
-                                       only. It has no influence on the Maven build itself. -->
-                               <plugin>
-                                       <groupId>org.eclipse.m2e</groupId>
-                                       <artifactId>lifecycle-mapping</artifactId>
-                                       <version>1.0.0</version>
-                                       <configuration>
-                                               <lifecycleMappingMetadata>
-                                                       <pluginExecutions>
-                                                               <pluginExecution>
-                                                                       <pluginExecutionFilter>
-                                                                               <groupId>org.jacoco</groupId>
-                                                                               <artifactId>
-                                                                                       jacoco-maven-plugin
-                                                                               </artifactId>
-                                                                               <versionRange>
-                                                                                       [0.7.1.201405082137,)
-                                                                               </versionRange>
-                                                                               <goals>
-                                                                                       <goal>prepare-agent</goal>
-                                                                               </goals>
-                                                                       </pluginExecutionFilter>
-                                                                       <action>
-                                                                               <ignore></ignore>
-                                                                       </action>
-                                                               </pluginExecution>
-                                                       </pluginExecutions>
-                                               </lifecycleMappingMetadata>
-                                       </configuration>
-                               </plugin>
-                       </plugins>
-               </pluginManagement>
-       </build>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                    <!-- Use Google Java Style Guide:
+                    https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                    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}</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>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings 
+                    only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>org.jacoco</groupId>
+                                        <artifactId>
+                                            jacoco-maven-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [0.7.1.201405082137,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>prepare-agent</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 </project>
diff --git a/policy-endpoints/checkstyle-suppressions.xml b/policy-endpoints/checkstyle-suppressions.xml
new file mode 100644 (file)
index 0000000..0b65969
--- /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="OneTopLevelClass"
+    files="DmaapTopicSinkFactory.java|DmaapTopicSourceFactory.java|HttpServletServerFactory.java|HttpClientFactory.java|UebTopicSinkFactory.java|NoopTopicSinkFactory.java|UebTopicSourceFactory.java|TopicEndpoint.java|HttpServletServerFactory.java"
+    lines="1-9999"/>
+</suppressions>
index 6929484..a4ac93d 100644 (file)
@@ -1,6 +1,7 @@
 <!--
   ============LICENSE_START=======================================================
    Copyright (C) 2018 Ericsson. 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.
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>onap-java-style</id>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>process-sources</phase>
+                        <configuration>
+                    <!-- Use Google Java Style Guide:
+                    https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+                    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}</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>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.onap.oparent</groupId>
+                        <artifactId>checkstyle</artifactId>
+                        <version>${oparent.version}</version>
+                        <scope>compile</scope>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
 </project>
index ff49a11..fece646 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * policy-endpoints
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-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.
@@ -68,7 +68,7 @@ public interface Topic extends TopicRegisterable, Startable, Lockable {
     /**
      * Gets the communication infrastructure type.
      * 
-     * @return
+     * @return CommInfrastructure object
      */
     public CommInfrastructure getTopicCommInfrastructure();
 
index 30cc923..d5e04d5 100644 (file)
@@ -140,10 +140,6 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory {
      */
     protected HashMap<String, DmaapTopicSource> dmaapTopicSources = new HashMap<>();
 
-
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public DmaapTopicSource build(BusTopicParams busTopicParams) {
 
@@ -166,9 +162,6 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory {
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public List<DmaapTopicSource> build(Properties properties) {
 
@@ -383,11 +376,6 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory {
         return dmaapTopicSourceLst;
     }
 
-    /**
-     * {@inheritDoc}
-     * 
-     * @throws IllegalArgumentException throws illegal argument exception
-     */
     @Override
     public DmaapTopicSource build(List<String> servers, String topic, String apiKey, String apiSecret) {
         return this.build(BusTopicParams.builder()
@@ -403,19 +391,11 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory {
                 .build());
     }
 
-    /**
-     * {@inheritDoc}
-     * 
-     * @throws IllegalArgumentException throws illegal argument exception
-     */
     @Override
     public DmaapTopicSource build(List<String> servers, String topic) {
         return this.build(servers, topic, null, null);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void destroy(String topic) {
 
@@ -448,9 +428,6 @@ class IndexedDmaapTopicSourceFactory implements DmaapTopicSourceFactory {
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public DmaapTopicSource get(String topic) {
 
index 4f62ffa..f3f3e15 100644 (file)
@@ -130,9 +130,6 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
      */
     protected HashMap<String, UebTopicSource> uebTopicSources = new HashMap<>();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public UebTopicSource build(BusTopicParams busTopicParams) {
         if (busTopicParams.getServers() == null || busTopicParams.getServers().isEmpty()) {
@@ -158,9 +155,6 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public List<UebTopicSource> build(Properties properties) {
 
@@ -187,18 +181,19 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
                     continue;
                 }
 
-                List<String> serverList = new ArrayList<>(Arrays.asList(servers.split("\\s*,\\s*")));
+                final List<String> serverList = new ArrayList<>(Arrays.asList(servers.split("\\s*,\\s*")));
 
-                String apiKey = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + "." + topic
-                        + PolicyEndPointProperties.PROPERTY_TOPIC_API_KEY_SUFFIX);
+                final String apiKey = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS 
+                        + "." + topic + PolicyEndPointProperties.PROPERTY_TOPIC_API_KEY_SUFFIX);
 
-                String apiSecret = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + "."
-                        + topic + PolicyEndPointProperties.PROPERTY_TOPIC_API_SECRET_SUFFIX);
+                final String apiSecret = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS 
+                        + "." + topic + PolicyEndPointProperties.PROPERTY_TOPIC_API_SECRET_SUFFIX);
 
-                String consumerGroup = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS + "."
-                        + topic + PolicyEndPointProperties.PROPERTY_TOPIC_SOURCE_CONSUMER_GROUP_SUFFIX);
+                final String consumerGroup = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS 
+                        + "." + topic + PolicyEndPointProperties.PROPERTY_TOPIC_SOURCE_CONSUMER_GROUP_SUFFIX);
 
-                String consumerInstance = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS
+                final String consumerInstance = properties.getProperty(
+                        PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS
                         + "." + topic + PolicyEndPointProperties.PROPERTY_TOPIC_SOURCE_CONSUMER_INSTANCE_SUFFIX);
 
                 String fetchTimeoutString = properties.getProperty(PolicyEndPointProperties.PROPERTY_UEB_SOURCE_TOPICS
@@ -269,9 +264,6 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
         return newUebTopicSources;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public UebTopicSource build(List<String> servers, String topic, String apiKey, String apiSecret) {
 
@@ -287,17 +279,11 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
                 .allowSelfSignedCerts(true).build());
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public UebTopicSource build(List<String> servers, String topic) {
         return this.build(servers, topic, null, null);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void destroy(String topic) {
 
@@ -330,9 +316,6 @@ class IndexedUebTopicSourceFactory implements UebTopicSourceFactory {
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public UebTopicSource get(String topic) {
 
index aaf0cfb..716ce95 100644 (file)
@@ -112,9 +112,6 @@ public interface BusPublisher {
             }
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public boolean send(String partitionId, String message) {
             if (message == null) {
@@ -130,9 +127,6 @@ public interface BusPublisher {
             return true;
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void close() {
             logger.info("{}: CLOSE", this);
@@ -240,9 +234,6 @@ public interface BusPublisher {
             logger.info("{}: CREATION: using protocol {}", this, protocol.getValue());
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public void close() {
             logger.info("{}: CLOSE", this);
@@ -254,9 +245,6 @@ public interface BusPublisher {
             }
         }
 
-        /**
-         * {@inheritDoc}
-         */
         @Override
         public boolean send(String partitionId, String message) {
             if (message == null) {
index 7f03286..b752d91 100644 (file)
@@ -3,6 +3,7 @@
  * policy-endpoints
  * ================================================================================
  * Copyright (C) 2018 Samsung Electronics Co., Ltd. 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.
 
 package org.onap.policy.common.endpoints.event.comm.bus.internal;
 
-import org.apache.commons.lang3.StringUtils;
-
 import java.util.List;
 import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * Member variables of this Params class are as follows.
@@ -174,7 +174,7 @@ public class BusTopicParams {
     }
 
     /**
-     * Methods to Check if the property is INVALID
+     * Methods to Check if the property is INVALID.
      */
 
     boolean isEnvironmentInvalid() {
@@ -231,7 +231,7 @@ public class BusTopicParams {
     }
 
     /**
-     * Methods to Check if the property is Valid
+     * Methods to Check if the property is Valid.
      */
 
     boolean isApiKeyValid() {
index 6e8c401..c8d6bd5 100644 (file)
@@ -78,9 +78,6 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
      */
     public abstract void init();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean start() {
         logger.info("{}: starting", this);
@@ -102,9 +99,6 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
         return true;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean stop() {
 
@@ -129,9 +123,6 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
         return true;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean send(String message) {
 
@@ -161,26 +152,16 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
         return true;
     }
 
-
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setPartitionKey(String partitionKey) {
         this.partitionId = partitionKey;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String getPartitionKey() {
         return this.partitionId;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void shutdown() {
         this.stop();
@@ -208,7 +189,6 @@ public abstract class InlineBusTopicSink extends BusTopicBase implements BusTopi
         return true;
     }
 
-
     @Override
     public String toString() {
         return "InlineBusTopicSink [partitionId=" + partitionId + ", alive=" + alive + ", publisher=" + publisher + "]";
index eb43122..0153105 100644 (file)
@@ -114,9 +114,6 @@ public class InlineDmaapTopicSink extends InlineBusTopicSink implements DmaapTop
         logger.info("{}: DMAAP SINK created", this);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public CommInfrastructure getTopicCommInfrastructure() {
         return Topic.CommInfrastructure.DMAAP;
index b07a196..f989f80 100644 (file)
@@ -80,9 +80,6 @@ public class InlineUebTopicSink extends InlineBusTopicSink implements UebTopicSi
         return builder.toString();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public CommInfrastructure getTopicCommInfrastructure() {
         return Topic.CommInfrastructure.UEB;
index 0482e86..b9463e8 100644 (file)
@@ -234,9 +234,6 @@ public abstract class SingleThreadedBusTopicSource extends BusTopicBase
         logger.info("{}: exiting thread", this);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean offer(String event) {
         if (!this.alive) {
@@ -272,42 +269,27 @@ public abstract class SingleThreadedBusTopicSource extends BusTopicBase
                 + topicListeners.size() + ", toString()=" + super.toString() + "]";
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String getConsumerGroup() {
         return consumerGroup;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String getConsumerInstance() {
         return consumerInstance;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void shutdown() {
         this.stop();
         this.topicListeners.clear();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public int getFetchTimeout() {
         return fetchTimeout;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public int getFetchLimit() {
         return fetchLimit;
index 45c0b6f..8050de2 100644 (file)
@@ -139,9 +139,6 @@ public class SingleThreadedDmaapTopicSource extends SingleThreadedBusTopicSource
         logger.info("{}: INITTED", this);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public CommInfrastructure getTopicCommInfrastructure() {
         return Topic.CommInfrastructure.DMAAP;
index 23d3edc..de6aa86 100644 (file)
@@ -36,8 +36,6 @@ public class SingleThreadedUebTopicSource extends SingleThreadedBusTopicSource i
      * @param busTopicParams Parameters object containing all the required inputs
      * @throws IllegalArgumentException An invalid parameter passed in
      */
-
-
     public SingleThreadedUebTopicSource(BusTopicParams busTopicParams) {
 
         super(busTopicParams);
@@ -65,9 +63,6 @@ public class SingleThreadedUebTopicSource extends SingleThreadedBusTopicSource i
                 .allowSelfSignedCerts(this.allowSelfSignedCerts).build());
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public CommInfrastructure getTopicCommInfrastructure() {
         return Topic.CommInfrastructure.UEB;
index 0be8109..9463561 100644 (file)
@@ -70,7 +70,7 @@ public class JerseyClient implements HttpClient {
     /**
      * Constructor.
      * 
-     * name the name https is it https or not selfSignedCerts are there self signed certs hostname
+     * <p>name the name https is it https or not selfSignedCerts are there self signed certs hostname
      * the hostname port port being used basePath base context userName user password password
      * 
      * @param busTopicParams Input parameters object
@@ -126,7 +126,7 @@ public class JerseyClient implements HttpClient {
                         return new X509Certificate[0];
                     }
 
-                }}, new SecureRandom());
+                } }, new SecureRandom());
                 clientBuilder =
                         ClientBuilder.newBuilder().sslContext(sslContext).hostnameVerifier((host, session) -> true);
             } else {
index b98ed18..488512f 100644 (file)
@@ -179,33 +179,41 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory {
                 continue;
             }
 
-            String hostName = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String hostName = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_HOST_SUFFIX);
 
-            String contextUriPath = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String contextUriPath = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_CONTEXT_URIPATH_SUFFIX);
 
-            String userName = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String userName = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_USERNAME_SUFFIX);
 
-            String password = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String password = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_PASSWORD_SUFFIX);
 
-            String authUriPath = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String authUriPath = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_URIPATH_SUFFIX);
 
-            String restClasses = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String restClasses = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX);
 
-            String filterClasses = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
-                + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_FILTER_CLASSES_SUFFIX);
+            final String filterClasses = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+                    + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_FILTER_CLASSES_SUFFIX);
 
-            String restPackages = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String restPackages = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_REST_PACKAGES_SUFFIX);
-            String restUriPath = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            
+            final String restUriPath = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_HTTP_REST_URIPATH_SUFFIX);
 
-            String managedString = properties.getProperty(PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
+            final String managedString = properties.getProperty(
+                    PolicyEndPointProperties.PROPERTY_HTTP_SERVER_SERVICES + "."
                     + serviceName + PolicyEndPointProperties.PROPERTY_MANAGED_SUFFIX);
             boolean managed = true;
             if (managedString != null && !managedString.isEmpty()) {
@@ -233,14 +241,15 @@ class IndexedHttpServletServerFactory implements HttpServletServerFactory {
                 aaf = Boolean.parseBoolean(aafString);
             }
 
-            HttpServletServer service = build(serviceName, https, hostName, servicePort, contextUriPath, swagger, managed);
+            HttpServletServer service = build(serviceName, https, hostName, servicePort, 
+                    contextUriPath, swagger, managed);
 
             /* authentication method either AAF or HTTP Basic Auth */
 
             if (aaf) {
                 service.addFilterClass(contextUriPath, CadiFilter.class.getCanonicalName());
             } else if (userName != null && !userName.isEmpty() && password != null && !password.isEmpty()) {
-                    service.setBasicAuthentication(userName, password, authUriPath);
+                service.setBasicAuthentication(userName, password, authUriPath);
             }
 
             if (filterClasses != null && !filterClasses.isEmpty()) {
index 5f6bb54..df1f604 100644 (file)
@@ -40,5 +40,6 @@ public abstract class AafAuthFilter extends AuthorizationFilter {
     }
 
     protected abstract String getPermissionType(HttpServletRequest request);
+    
     protected abstract String getPermissionInstance(HttpServletRequest request);
 }
index 62fa052..ebac41e 100644 (file)
@@ -198,7 +198,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
     /**
      * Returns the https connector.
      * 
-     * @return
+     * @return the server connector
      */
     public ServerConnector httpsConnector() {
         SslContextFactory sslContextFactory = new SslContextFactory();
index 147dda7..fa2f3d2 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. 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.
@@ -123,9 +124,6 @@ public class HealthCheckReport {
         this.message = message;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String toString() {
         final StringBuilder builder = new StringBuilder();
index 5ffde38..c5204ae 100644 (file)
@@ -318,12 +318,12 @@ public class HttpClientTest {
             server.waitedStart(10000);
         }
 
-        final HttpClient clientPAP = HttpClient.factory.get("PAP");
-        final Response response = clientPAP.get();
+        final HttpClient clientPap = HttpClient.factory.get("PAP");
+        final Response response = clientPap.get();
         assertTrue(response.getStatus() == 200);
 
-        final HttpClient clientPDP = HttpClient.factory.get("PDP");
-        final Response response2 = clientPDP.get("test");
+        final HttpClient clientPdp = HttpClient.factory.get("PDP");
+        final Response response2 = clientPdp.get("test");
         assertTrue(response2.getStatus() == 500);
     }
 
diff --git a/pom.xml b/pom.xml
index 5294128..97df8bc 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                     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>checkstyle-suppressions.xml</suppressionsLocation>
                             <consoleOutput>true</consoleOutput>
-                            <failOnViolation>true</failOnViolation>
+                            <failsOnViolation>true</failsOnViolation>
                             <violationSeverity>warning</violationSeverity>
                         </configuration>
                     </execution>
index 31e0b85..600bbd3 100644 (file)
@@ -124,6 +124,13 @@ public class Serializer {
             oos.writeObject(object);
         }
 
+        /**
+         * Read the object.
+         * 
+         * @param ois input stream
+         * @return the object
+         * @throws IOException throws IO exception if cannot read
+         */
         public Object readObject(ObjectInputStream ois) throws IOException {
             try {
                 return ois.readObject();
index 9e73a3f..ee303eb 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2018 Ericsson. 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.
@@ -39,21 +40,21 @@ import org.hamcrest.Matcher;
 @SuppressWarnings("rawtypes")
 public class ToStringTester implements Tester {
 
-    private final Matcher m;
+    private final Matcher matcher;
 
     public ToStringTester() {
-        m = anything();
+        matcher = anything();
     }
 
-    public ToStringTester(final Matcher m) {
-        this.m = m;
+    public ToStringTester(final Matcher matcher) {
+        this.matcher = matcher;
     }
 
     @SuppressWarnings("unchecked")
     @Override
     public void run(final PojoClass pojoClass) {
         final Class clazz = pojoClass.getClazz();
-        if (anyOf(m).matches(clazz)) {
+        if (anyOf(matcher).matches(clazz)) {
             final Object classInstance = ValidationHelper.getBasicInstance(pojoClass);
 
             Affirm.affirmFalse("Found default toString output",