Fix pom and checkstyle warnings in common 37/58937/1
authorliamfallon <liam.fallon@ericsson.com>
Fri, 3 Aug 2018 12:33:44 +0000 (13:33 +0100)
committerliamfallon <liam.fallon@ericsson.com>
Fri, 3 Aug 2018 12:34:02 +0000 (13:34 +0100)
Some dependency versions are now managed in the master POM
Checkstyle showed up some warnings in paramters and capabilities.

Change-Id: Ifebd8a076bdb3fda626b5b1fda9324801bf58643
Issue-ID: POLICY-716
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
19 files changed:
capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java
capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java
common-logging/pom.xml
common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java
common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java
common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java
policy-endpoints/pom.xml
utils/pom.xml

index 6e5680d..cc9da0a 100644 (file)
@@ -26,21 +26,21 @@ package org.onap.policy.common.capabilities;
 public interface Lockable {
 
     /**
-     * locks this entity
+     * Locks this entity.
      * 
      * @return true is the lock operation was successful, false otherwise
      */
     public boolean lock();
 
     /**
-     * unlocks this entity
+     * Unlocks this entity.
      * 
      * @return true is the unlock operation was successful, false otherwise
      */
     public boolean unlock();
 
     /**
-     * is this entity locked?
+     * Checks if this entity is locked.
      * 
      * @return true if the entity is in a locked state, false otherwise
      */
index 1595272..49af75f 100644 (file)
@@ -53,7 +53,7 @@ public interface Startable {
     public void shutdown();
 
     /**
-     * is it alive?
+     * Checks if the entity is alive.
      * 
      * @return boolean. true if alive, otherwise false
      */
index 747e4b2..143ae6b 100644 (file)
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>javax.servlet-api</artifactId>
-      <version>3.0.1</version>
       <scope>compile</scope>
     </dependency>
        <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
-               <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>com.att.eelf</groupId>
index 91c3d14..703de92 100644 (file)
@@ -71,7 +71,7 @@ public class GroupValidationResult implements ValidationResult {
     }
 
     /**
-     * Construct a validation result for a field
+     * Construct a validation result for a field.
      * 
      * @param field The parameter field
      * @param ParameterGroup The parameter group containing the field
@@ -197,7 +197,6 @@ public class GroupValidationResult implements ValidationResult {
 
     /**
      * Set the validation result on on a parameter group.
-     * 
      * On a sequence of calls, the most serious validation status is recorded, assuming the status enum ordinal increase
      * in order of severity
      * 
index 6d0aae5..ae4dbd2 100644 (file)
@@ -24,6 +24,9 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
 import java.io.FileReader;
 import java.io.IOException;
 import java.nio.file.Files;
@@ -32,8 +35,6 @@ import java.nio.file.Paths;
 import org.junit.Test;
 import org.onap.policy.common.parameters.testclasses.TestParametersL00;
 
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
 
 public class TestJsonInput {
 
@@ -45,7 +46,8 @@ public class TestJsonInput {
         try {
             // Read the parameters from JSON using Gson
             final Gson gson = new GsonBuilder().create();
-            testParameterGroup = gson.fromJson(new FileReader("src/test/resources/parameters/TestParameters.json"), TestParametersL00.class);
+            testParameterGroup = gson.fromJson(new FileReader("src/test/resources/parameters/TestParameters.json"),
+                            TestParametersL00.class);
         } catch (final Exception e) {
             fail("test should not throw an exception here: " + e.getMessage());
         }
@@ -53,7 +55,7 @@ public class TestJsonInput {
         GroupValidationResult validationResult = testParameterGroup.validate();
         assertTrue(validationResult.isValid());
         assertEquals("l00NameFromFile", testParameterGroup.getName());
-        
+
         String expectedResult = new String(Files.readAllBytes(
                         Paths.get("src/test/resources/expectedValidationResults/TestJsonYamlValidationResult.txt")))
                                         .replaceAll("\\s+", "");
index 7d80352..e24f1c8 100644 (file)
@@ -42,7 +42,8 @@ public class TestYamlInput {
         try {
             // Read the parameters from JSON using Gson
             final Yaml yaml = new Yaml();
-            testParameterGroup = yaml.loadAs(new FileReader("src/test/resources/parameters/TestParameters.yaml"), TestParametersL00.class);
+            testParameterGroup = yaml.loadAs(new FileReader("src/test/resources/parameters/TestParameters.yaml"),
+                            TestParametersL00.class);
         } catch (final Exception e) {
             fail("test should not throw an exception here: " + e.getMessage());
         }
@@ -50,7 +51,7 @@ public class TestYamlInput {
         GroupValidationResult validationResult = testParameterGroup.validate();
         assertTrue(validationResult.isValid());
         assertEquals("l00NameFromFile", testParameterGroup.getName());
-        
+
         String expectedResult = new String(Files.readAllBytes(
                         Paths.get("src/test/resources/expectedValidationResults/TestJsonYamlValidationResult.txt")))
                                         .replaceAll("\\s+", "");
index f545ce6..681eb69 100644 (file)
@@ -20,8 +20,8 @@
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class EmptyParameterGroup implements ParameterGroup {
     private String name;
index cdab127..fcb2bb1 100644 (file)
@@ -20,8 +20,8 @@
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithArray implements ParameterGroup {
     private String name;
index 0f99309..75ae45b 100644 (file)
@@ -23,8 +23,8 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithCollection implements ParameterGroup {
     private String name;
@@ -32,11 +32,12 @@ public class ParameterGroupWithCollection implements ParameterGroup {
 
     /**
      * Create a test parameter group.
+     * 
      * @param name the parameter group name
      */
     public ParameterGroupWithCollection(final String name) {
         this.name = name;
-        
+
         intArrayList.add(1);
         intArrayList.add(2);
         intArrayList.add(3);
@@ -45,12 +46,12 @@ public class ParameterGroupWithCollection implements ParameterGroup {
     public List<Integer> getIntArrayList() {
         return intArrayList;
     }
-    
+
     @Override
     public String getName() {
         return name;
     }
-    
+
     @Override
     public GroupValidationResult validate() {
         return new GroupValidationResult(this);
index 3de3270..ca44106 100644 (file)
@@ -23,8 +23,8 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithIllegalMapKey implements ParameterGroup {
     private String name;
index 8eb697a..9253f15 100644 (file)
@@ -23,8 +23,8 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithIllegalMapValue implements ParameterGroup {
     private String name;
index 37399da..0d113dc 100644 (file)
@@ -22,8 +22,8 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.List;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithNullCollection implements ParameterGroup {
     private String name;
index 80f5535..9e1601c 100644 (file)
@@ -22,8 +22,8 @@ package org.onap.policy.common.parameters.testclasses;
 
 import java.util.Map;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithNullMapValue implements ParameterGroup {
     private String name;
index e7d1de7..5ece07b 100644 (file)
@@ -23,8 +23,8 @@ package org.onap.policy.common.parameters.testclasses;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
 
 public class ParameterGroupWithParameterGroupCollection implements ParameterGroup {
     private String name;
index 6b8460c..6cd6560 100644 (file)
@@ -24,9 +24,9 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterConstants;
+import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.ValidationStatus;
 
 public class TestParametersL00 implements ParameterGroup {
@@ -38,9 +38,10 @@ public class TestParametersL00 implements ParameterGroup {
     private Map<String, TestParametersLGeneric> l00LGenericNestedMap = new LinkedHashMap<>();
 
     /**
-     * Default constructor
+     * Default constructor.
      */
     public TestParametersL00() {
+        // Default Cnstructor
     }
     
     /**
index 94a67ec..6efddac 100644 (file)
@@ -24,9 +24,9 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterConstants;
+import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.ValidationStatus;
 
 public class TestParametersL10 implements ParameterGroup {
@@ -38,9 +38,10 @@ public class TestParametersL10 implements ParameterGroup {
     private Map<String, TestParametersLGeneric> l10LGenericNestedMap = new LinkedHashMap<>();
 
     /**
-     * Default constructor
+     * Default constructor.
      */
     public TestParametersL10() {
+        // Default Constructor
     }
     
     /**
index ce368ba..2e678da 100644 (file)
@@ -20,9 +20,9 @@
 
 package org.onap.policy.common.parameters.testclasses;
 
-import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.GroupValidationResult;
 import org.onap.policy.common.parameters.ParameterConstants;
+import org.onap.policy.common.parameters.ParameterGroup;
 import org.onap.policy.common.parameters.ValidationStatus;
 
 public class TestParametersLGeneric implements ParameterGroup {
@@ -31,9 +31,10 @@ public class TestParametersLGeneric implements ParameterGroup {
     private String lgenericStringField = "Legal " + this.getClass().getCanonicalName();
     
     /**
-     * Default constructor
+     * Default constructor.
      */
     public TestParametersLGeneric() {
+        // Default Constructor
     }
     
     /**
index b0e84f8..5510f3d 100644 (file)
@@ -62,7 +62,6 @@
         <dependency>
             <groupId>com.att.nsa</groupId>
             <artifactId>cambriaClient</artifactId>
-            <version>${cambria.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>${http.client.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore</artifactId>
-            <version>${http.core.version}</version>
         </dependency>
 
         <dependency>
             <groupId>io.swagger</groupId>
             <artifactId>swagger-jersey2-jaxrs</artifactId>
-            <version>${jersey.swagger.version}</version>
         </dependency>
 
         <dependency>
index 1152d3a..73fab75 100644 (file)
                <dependency>
                        <groupId>javax.persistence</groupId>
                        <artifactId>persistence-api</artifactId>
-                       <version>${javax.persistence.api.version}</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
-                       <version>${slf4j.version}</version>
                        <scope>provided</scope>
                </dependency>
                <dependency>