summaryrefslogtreecommitdiffstats
path: root/models-base/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-12-11 14:47:53 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-11 14:47:53 +0000
commitf32f276bb5dddfc4d11be9f0c13227547a0110b1 (patch)
tree2cd7834e044b443d28d702d12eda7ce7ad069714 /models-base/src
parent360cffc3b859716273251f077a469939fc80e100 (diff)
parent5a366fdab88b7205cedd2ba687109b80dc374544 (diff)
Merge "Fix minor checksyle issues in models"
Diffstat (limited to 'models-base/src')
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfConcept.java19
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfModelService.java17
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/PfModelExceptionInfoTest.java5
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/testconcepts/DummyPfKey.java4
4 files changed, 25 insertions, 20 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConcept.java b/models-base/src/main/java/org/onap/policy/models/base/PfConcept.java
index a1cfac4ae..c77c68fd5 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfConcept.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfConcept.java
@@ -27,8 +27,8 @@ import java.util.List;
import lombok.NonNull;
/**
- * This class is the base class for all Policy Framework concept classes. It enforces implementation
- * of abstract methods and interfaces on all concepts that are sub-classes of this class.
+ * This class is the base class for all Policy Framework concept classes. It enforces implementation of abstract methods
+ * and interfaces on all concepts that are sub-classes of this class.
*/
public abstract class PfConcept implements Serializable, Comparable<PfConcept> {
@@ -37,7 +37,9 @@ public abstract class PfConcept implements Serializable, Comparable<PfConcept> {
/**
* Default constructor.
*/
- public PfConcept() {}
+ public PfConcept() {
+ // Default Constructor
+ }
/**
* Copy constructor.
@@ -56,8 +58,8 @@ public abstract class PfConcept implements Serializable, Comparable<PfConcept> {
public abstract PfKey getKey();
/**
- * Gets a list of all keys for this concept and all concepts that are defined or referenced by
- * this concept and its sub-concepts.
+ * Gets a list of all keys for this concept and all concepts that are defined or referenced by this concept and its
+ * sub-concepts.
*
* @return the keys used by this concept and its contained concepts
*/
@@ -67,14 +69,13 @@ public abstract class PfConcept implements Serializable, Comparable<PfConcept> {
* Validate that this concept is structurally correct.
*
* @param result the parameter in which the result of the validation will be returned
- * @return the validation result that was passed in in the @{link result} field with the result
- * of this validation added
+ * @return the validation result that was passed in in the @{link result} field with the result of this validation
+ * added
*/
public abstract PfValidationResult validate(@NonNull final PfValidationResult result);
/**
- * Clean this concept, tidy up any superfluous information such as leading and trailing white
- * space.
+ * Clean this concept, tidy up any superfluous information such as leading and trailing white space.
*/
public abstract void clean();
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfModelService.java b/models-base/src/main/java/org/onap/policy/models/base/PfModelService.java
index 67ba59c8b..134b6213e 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfModelService.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfModelService.java
@@ -30,14 +30,13 @@ import lombok.NonNull;
/**
* The model service makes Policy Framework models available to all classes in a JVM.
*
- * <p>The reason for having a model service is to avoid having to pass concept and model definitions
- * down long call chains in modules such as the Policy Framework engine and editor. The model
- * service makes the model and concept definitions available statically.
+ * <p>The reason for having a model service is to avoid having to pass concept and model definitions down long call
+ * chains in modules such as the Policy Framework engine and editor. The model service makes the model and concept
+ * definitions available statically.
*
- * <p>Note that the use of the model service means that only a single Policy Framework model of a
- * particular type may exist in Policy Framework (particularly the engine) at any time. Of course
- * the model in a JVM can be changed at any time provided all users of the model are stopped and
- * restarted in an orderly manner.
+ * <p>Note that the use of the model service means that only a single Policy Framework model of a particular type may
+ * exist in Policy Framework (particularly the engine) at any time. Of course the model in a JVM can be changed at any
+ * time provided all users of the model are stopped and restarted in an orderly manner.
*/
public abstract class PfModelService {
// The map holding the models
@@ -46,7 +45,9 @@ public abstract class PfModelService {
/**
* This class is an abstract static class that cannot be extended.
*/
- private PfModelService() {}
+ private PfModelService() {
+ // Default constructor
+ }
/**
* Register a model with the model service.
diff --git a/models-base/src/test/java/org/onap/policy/models/base/PfModelExceptionInfoTest.java b/models-base/src/test/java/org/onap/policy/models/base/PfModelExceptionInfoTest.java
index 183b44c13..b418234c7 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/PfModelExceptionInfoTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/PfModelExceptionInfoTest.java
@@ -33,11 +33,12 @@ import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
* @author Liam Fallon (liam.fallon@est.tech)
*/
public class PfModelExceptionInfoTest {
+
@Test
- public void exceptionInfoTest() {
+ public void testExceptionInfo() {
try {
throw new PfModelException(Response.Status.ACCEPTED, "HELLO");
- } catch (PfModelException pfme) {
+ } catch (PfModelException pfme) {
String errorMessage = getErrorMessage(pfme);
assertEquals("Server returned: Accepted", errorMessage.substring(0, 25));
}
diff --git a/models-base/src/test/java/org/onap/policy/models/base/testconcepts/DummyPfKey.java b/models-base/src/test/java/org/onap/policy/models/base/testconcepts/DummyPfKey.java
index 058ef37c3..ed2fb9885 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/testconcepts/DummyPfKey.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/testconcepts/DummyPfKey.java
@@ -33,7 +33,9 @@ import org.onap.policy.models.base.PfValidationResult;
public class DummyPfKey extends PfKey {
private static final long serialVersionUID = 1L;
- public DummyPfKey() { }
+ public DummyPfKey() {
+ // Default constructor
+ }
public DummyPfKey(DummyPfKey source) {
super(source);