summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-12-04 09:20:04 +0000
committerliamfallon <liam.fallon@est.tech>2019-12-04 17:14:11 +0000
commit7a0a44eac6167cfeff935c39f2c3f20d3a893c3e (patch)
tree5874e4b8f0e4b5ce8cc222912833029729fe4ed3 /model
parent9253f81d14a5217479ca8e59efb198eaa32ec9f0 (diff)
Minor changes for new Eclipse checkstyle checks
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. Issue-ID: POLICY-1913 Change-Id: I30ba25e3e425c6d54c77f925e8da3ab841a8357c Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model')
-rw-r--r--model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java4
-rw-r--r--model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java7
-rw-r--r--model/model-api/src/test/resources/models/PolicyModel.xml48
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java20
-rw-r--r--model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java17
5 files changed, 51 insertions, 45 deletions
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
index 6eff2d806..3f2affb42 100644
--- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
@@ -43,7 +43,9 @@ public abstract class AxConcept implements Serializable, Comparable<AxConcept> {
/**
* Default constructor.
*/
- public AxConcept() {}
+ public AxConcept() {
+ // Default constructor
+ }
/**
* Copy constructor.
diff --git a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
index 77ded31d6..cdbe62351 100644
--- a/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
+++ b/model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
@@ -59,8 +59,7 @@ public final class ApexModelImpl implements ApexModel {
* Create an implementation of the Apex editor and model APIs.
*
* @param apexProperties The properties to use for the model
- * @param jsonMode set to true to return JSON strings in list and delete operations, otherwise
- * set to false
+ * @param jsonMode set to true to return JSON strings in list and delete operations, otherwise set to false
*/
public ApexModelImpl(final Properties apexProperties, final boolean jsonMode) {
this.apexProperties = apexProperties;
@@ -81,7 +80,9 @@ public final class ApexModelImpl implements ApexModel {
/**
* Constructor, prevents this class being sub-classed.
*/
- private ApexModelImpl() {}
+ private ApexModelImpl() {
+ // Private constructor to block subclassing
+ }
/**
* {@inheritDoc}.
diff --git a/model/model-api/src/test/resources/models/PolicyModel.xml b/model/model-api/src/test/resources/models/PolicyModel.xml
index 684ce32c9..e3bf59f29 100644
--- a/model/model-api/src/test/resources/models/PolicyModel.xml
+++ b/model/model-api/src/test/resources/models/PolicyModel.xml
@@ -6,15 +6,15 @@
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=========================================================
-->
@@ -41,7 +41,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e000</UUID>
- <description><![CDATA[Generated description for concept referred to by key "ContextSchemas:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "ContextSchemas:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -55,7 +55,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e001</UUID>
- <description><![CDATA[Generated description for concept referred to by key "KeyInfoMapKey:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "KeyInfoMapKey:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -69,7 +69,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e002</UUID>
- <description><![CDATA[Generated description for concept referred to by key "MapType:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "MapType:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -83,7 +83,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e003</UUID>
- <description><![CDATA[Generated description for concept referred to by key "PolicyModel:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "PolicyModel:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -97,7 +97,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e004</UUID>
- <description><![CDATA[Generated description for concept referred to by key "StringType:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "StringType:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -111,7 +111,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e005</UUID>
- <description><![CDATA[Generated description for concept referred to by key "context:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "context:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -125,7 +125,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e006</UUID>
- <description><![CDATA[Generated description for concept referred to by key "contextAlbum0:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "contextAlbum0:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -139,7 +139,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e007</UUID>
- <description><![CDATA[Generated description for concept referred to by key "contextAlbum1:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "contextAlbum1:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -153,7 +153,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e008</UUID>
- <description><![CDATA[Generated description for concept referred to by key "eventContextItem0:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "eventContextItem0:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -167,7 +167,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e009</UUID>
- <description><![CDATA[Generated description for concept referred to by key "eventContextItem1:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "eventContextItem1:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -181,7 +181,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e010</UUID>
- <description><![CDATA[Generated description for concept referred to by key "events:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "events:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -195,7 +195,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e011</UUID>
- <description><![CDATA[Generated description for concept referred to by key "inEvent:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "inEvent:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -209,7 +209,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e012</UUID>
- <description><![CDATA[Generated description for concept referred to by key "outEvent0:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "outEvent0:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -223,7 +223,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e013</UUID>
- <description><![CDATA[Generated description for concept referred to by key "outEvent1:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "outEvent1:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -237,7 +237,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e014</UUID>
- <description><![CDATA[Generated description for concept referred to by key "policies:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "policies:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -251,7 +251,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e015</UUID>
- <description><![CDATA[Generated description for concept referred to by key "policy:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "policy:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -265,7 +265,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e016</UUID>
- <description><![CDATA[Generated description for concept referred to by key "task:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "task:0.0.1"]]></description>
</value>
</entry>
<entry>
@@ -279,7 +279,7 @@
<version>0.0.1</version>
</key>
<UUID>0ce9168c-e6df-414f-9646-6da464b6e017</UUID>
- <description><![CDATA[Generated description for concept referred to by key "tasks:0.0.1"]]></description>
+ <description><![CDATA[Description for concept with key "tasks:0.0.1"]]></description>
</value>
</entry>
</keyInfoMap>
@@ -709,7 +709,8 @@
<version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
</key>
<schemaFlavour>Java</schemaFlavour>
- <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem00A</schemaDefinition>
+ <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem00A
+ </schemaDefinition>
</value>
</entry>
<entry>
@@ -723,7 +724,8 @@
<version xmlns="http://www.onap.org/policy/apex-pdp">0.0.1</version>
</key>
<schemaFlavour>Java</schemaFlavour>
- <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem000</schemaDefinition>
+ <schemaDefinition>org.onap.policy.apex.model.policymodel.concepts.TestContextItem000
+ </schemaDefinition>
</value>
</entry>
<entry>
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java
index 7ecb8fb0f..b11158cf6 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java
@@ -5,15 +5,15 @@
* 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=========================================================
*/
@@ -33,8 +33,8 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * Helper class used to extract information from a policy model into a policy model that is a subset
- * of the original policy model.
+ * Helper class used to extract information from a policy model into a policy model that is a subset of the original
+ * policy model.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@@ -44,11 +44,12 @@ public final class PolicyModelSplitter {
/**
* Private constructor used to prevent sub class instantiation.
*/
- private PolicyModelSplitter() {}
+ private PolicyModelSplitter() {
+ // Private constructor to block subclassing
+ }
/**
- * Get a sub policy model with only the information required for the specified policies from a
- * larger policy model.
+ * Get a sub policy model with only the information required for the specified policies from a larger policy model.
*
* @param sourcePolicyModel the source Apex Model
* @param subPolicies the policies to include in sub policy model
@@ -61,8 +62,7 @@ public final class PolicyModelSplitter {
}
/**
- * Get a sub policy model with only the information required for the specified policies from a
- * larger policy model.
+ * Get a sub policy model with only the information required for the specified policies from a larger policy model.
*
* @param sourcePolicyModel the source Apex Model
* @param subPolicies the policies to include in sub policy model
diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java
index cb0f799a0..4f43e6c4d 100644
--- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java
+++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java
@@ -5,15 +5,15 @@
* 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=========================================================
*/
@@ -27,8 +27,8 @@ import java.util.Map.Entry;
import java.util.NavigableMap;
/**
- * This class provides utility functions for tree maps. A function to find the nearest match in the
- * tree map to an input string is provided.
+ * This class provides utility functions for tree maps. A function to find the nearest match in the tree map to an input
+ * string is provided.
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
@@ -37,11 +37,12 @@ public abstract class TreeMapUtils {
/**
* This class is a utility class that can't be instantiated.
*/
- private TreeMapUtils() {}
+ private TreeMapUtils() {
+ // Private constructor to block subclassing
+ }
/**
- * Find the list of entries that matches a given word, for example "p" will match "put",
- * "policy", and "push".
+ * Find the list of entries that matches a given word, for example "p" will match "put", "policy", and "push".
*
* @param <T> the generic type for the value of the tree map
* @param searchMap the map that the method operates on