summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-08-03 13:33:44 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-08-03 13:34:02 +0100
commit33eb63bbb70140630ecefae9d92c2c8f7d23fc63 (patch)
treec8b68e21cb6e3fd0eb65032fa4bce10424094757
parent6d662cb19aa858b743ab7e01d02a2a173abebcad (diff)
Fix pom and checkstyle warnings in common
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>
-rw-r--r--capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java6
-rw-r--r--capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java2
-rw-r--r--common-logging/pom.xml2
-rw-r--r--common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java3
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java10
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java5
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java9
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java2
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java5
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java5
-rw-r--r--common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java5
-rw-r--r--policy-endpoints/pom.xml4
-rw-r--r--utils/pom.xml2
19 files changed, 35 insertions, 37 deletions
diff --git a/capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java b/capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java
index 6e5680d1..cc9da0a9 100644
--- a/capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java
+++ b/capabilities/src/main/java/org/onap/policy/common/capabilities/Lockable.java
@@ -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
*/
diff --git a/capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java b/capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java
index 1595272d..49af75f8 100644
--- a/capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java
+++ b/capabilities/src/main/java/org/onap/policy/common/capabilities/Startable.java
@@ -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
*/
diff --git a/common-logging/pom.xml b/common-logging/pom.xml
index 747e4b2a..143ae6b8 100644
--- a/common-logging/pom.xml
+++ b/common-logging/pom.xml
@@ -45,13 +45,11 @@
<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>
diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
index 91c3d145..703de927 100644
--- a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
+++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
@@ -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
*
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java
index 6d0aae5e..ae4dbd2c 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestJsonInput.java
@@ -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+", "");
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
index 7d803525..e24f1c8e 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/TestYamlInput.java
@@ -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+", "");
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java
index f545ce65..681eb693 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/EmptyParameterGroup.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java
index cdab1272..fcb2bb1b 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithArray.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java
index 0f993099..75ae45b8 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithCollection.java
@@ -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);
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java
index 3de3270e..ca441060 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapKey.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java
index 8eb697a4..9253f158 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithIllegalMapValue.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java
index 37399da3..0d113dc6 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullCollection.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java
index 80f55355..9e1601c3 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithNullMapValue.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java
index e7d1de75..5ece07b4 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/ParameterGroupWithParameterGroupCollection.java
@@ -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;
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java
index 6b8460cd..6cd65603 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL00.java
@@ -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
}
/**
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java
index 94a67ec7..6efddac0 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersL10.java
@@ -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
}
/**
diff --git a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java
index ce368bac..2e678da0 100644
--- a/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java
+++ b/common-parameters/src/test/java/org/onap/policy/common/parameters/testclasses/TestParametersLGeneric.java
@@ -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
}
/**
diff --git a/policy-endpoints/pom.xml b/policy-endpoints/pom.xml
index b0e84f87..5510f3d6 100644
--- a/policy-endpoints/pom.xml
+++ b/policy-endpoints/pom.xml
@@ -62,7 +62,6 @@
<dependency>
<groupId>com.att.nsa</groupId>
<artifactId>cambriaClient</artifactId>
- <version>${cambria.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
@@ -156,18 +155,15 @@
<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>
diff --git a/utils/pom.xml b/utils/pom.xml
index 1152d3ad..73fab751 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -51,13 +51,11 @@
<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>