Minor changes for new Eclipse checkstyle checks 26/99126/5
authorliamfallon <liam.fallon@est.tech>
Wed, 4 Dec 2019 09:20:04 +0000 (09:20 +0000)
committerliamfallon <liam.fallon@est.tech>
Wed, 4 Dec 2019 17:14:11 +0000 (17:14 +0000)
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>
52 files changed:
auth/cli-codegen/src/main/java/org/onap/policy/apex/auth/clicodegen/CliEditorContants.java
client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/handling/RestUtils.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java
core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java
core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java
examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/AadmUseCaseTest.java
model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java
model/model-api/src/main/java/org/onap/policy/apex/model/modelapi/impl/ApexModelImpl.java
model/model-api/src/test/resources/models/PolicyModel.xml
model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitter.java
model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TreeMapUtils.java
packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml
plugins/plugins-context/plugins-context-schema/plugins-context-schema-avro/src/main/java/org/onap/policy/apex/plugins/context/schema/avro/AvroSchemaKeyTranslationUtilities.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/DummyStateFinalizerExecutor.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/DummyTaskExecutor.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/DummyTaskSelectExecutor.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventSubscriber.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventConverter.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/dummyclasses/DummyStateFinalizerExecutor.java
services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/dummyclasses/DummyTaskExecutor.java
services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/parameters/dummyclasses/DummyTaskSelectExecutor.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextBooleanItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextByteItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextDoubleItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextFloatItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextIntItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextLongObjectItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextStringItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeMapItem.java
testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/context/test/concepts/TestContextTreeSetItem.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/utils/Constants.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/utils/NetworkUtils.java
testsuites/integration/integration-context-test/src/test/resources/infinispan/default-jgroups-udp.xml
testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestContextUpdateModel.java
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestContext.java
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/adapt/jms/TestInitialContextFactory.java
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/DummyApexEventProducer.java
testsuites/performance/performance-benchmark-test/src/test/resources/logback-test.xml
tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/SchemaUtils.java
tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliOptions.java

index 3a82af7..b123d91 100644 (file)
@@ -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=========================================================
  */
@@ -128,5 +128,7 @@ public class CliEditorContants {
 
     public static final String DEFINITIONS = "definitions";
 
-    private CliEditorContants() {}
+    private CliEditorContants() {
+        // Private constructor to prevent subclassing
+    }
 }
index 5cb7af8..738f33c 100644 (file)
@@ -50,7 +50,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
  */
 public abstract class RestUtils {
     // Regular expressions for checking input types
-    private static final String XML_INPUT_TYPE_REGEXP = "^\\s*<\\?xml.*>\\s*"; //starts with <?xml...>
+    private static final String XML_INPUT_TYPE_REGEXP = "^\\s*<\\?xml.*>\\s*"; // starts with <?xml...>
     /**
      * starts with some kind of bracket [ or ( or {, then has something, then has bracket.
      */
@@ -59,7 +59,9 @@ public abstract class RestUtils {
     /**
      * Constructor, block inheritance.
      */
-    private RestUtils() {}
+    private RestUtils() {
+        // Private constructor to block subclassing
+    }
 
     /**
      * HTTP POST requests can't send nulls so we interpret blanks as nulls.
@@ -103,8 +105,7 @@ public abstract class RestUtils {
     }
 
     /**
-     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings
-     * into a map.
+     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings into a map.
      *
      * @param jsonString the incoming JSON string
      * @return a map of the JSON strings
@@ -123,8 +124,7 @@ public abstract class RestUtils {
     }
 
     /**
-     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings
-     * into a map.
+     * Apex HTTP PUT requests send simple single level JSON strings, this method reads those strings into a map.
      *
      * @param <C> the generic type
      * @param jsonString the incoming JSON string
index 698a1d8..b13db03 100644 (file)
@@ -244,5 +244,7 @@ public abstract class StateFinalizerExecutor
      * {@inheritDoc}.
      */
     @Override
-    public void setParameters(final ExecutorParameters parameters) {}
+    public void setParameters(final ExecutorParameters parameters) {
+        // Not used
+    }
 }
index ab81a84..50abeea 100644 (file)
@@ -314,5 +314,7 @@ public abstract class TaskExecutor
      * {@inheritDoc}.
      */
     @Override
-    public void setParameters(final ExecutorParameters parameters) {}
+    public void setParameters(final ExecutorParameters parameters) {
+        // Not used
+    }
 }
index d99d6b0..3f360ea 100644 (file)
@@ -131,8 +131,8 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
     @Override
     public final void executePost(final boolean returnValue) throws StateMachineException {
         if (!returnValue) {
-            String errorMessage =
-                    "execute-post: task selection logic failed on state \"" + axState.getKey().getId() + "\"";
+            String errorMessage = "execute-post: task selection logic failed on state \"" + axState.getKey().getId()
+                    + "\"";
             if (executionContext.getMessage() != null) {
                 errorMessage += ", user message: " + executionContext.getMessage();
             }
@@ -232,5 +232,7 @@ public abstract class TaskSelectExecutor implements Executor<EnEvent, AxArtifact
      * {@inheritDoc}.
      */
     @Override
-    public void setParameters(final ExecutorParameters parameters) {}
+    public void setParameters(final ExecutorParameters parameters) {
+        // Not used
+    }
 }
index 16a3369..6da92d5 100644 (file)
@@ -60,7 +60,9 @@ public abstract class ClassUtils {
     /**
      * Private constructor used to prevent sub class instantiation.
      */
-    private ClassUtils() {}
+    private ClassUtils() {
+        // Private constructor to block subclassing
+    }
 
     /**
      * Get the class names of all classes on the class path. WARNING: This is a heavy call, use sparingly
index a6c3c58..1c5f2a3 100644 (file)
@@ -29,12 +29,13 @@ import java.net.NetworkInterface;
 import java.net.Socket;
 import java.net.UnknownHostException;
 import java.util.Enumeration;
+
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
 
 /**
- * The Class MessagingUtils is a class with static methods used in IPC messaging for finding free
- * ports, translating host names to addresses, serializing objects and flushing object streams.
+ * The Class MessagingUtils is a class with static methods used in IPC messaging for finding free ports, translating
+ * host names to addresses, serializing objects and flushing object streams.
  *
  * @author Sajeevan Achuthan (sajeevan.achuthan@ericsson.com)
  */
@@ -53,11 +54,13 @@ public final class MessagingUtils {
     /**
      * Private constructor used to prevent sub class instantiation.
      */
-    private MessagingUtils() {}
+    private MessagingUtils() {
+        // Private constructor to block subclassing
+    }
 
     /**
-     * This method searches the availability of the port, if the requested port not available, this
-     * method will throw an exception.
+     * This method searches the availability of the port, if the requested port not available, this method will throw an
+     * exception.
      *
      * @param port the port to check
      * @return the port verified as being free
@@ -75,9 +78,9 @@ public final class MessagingUtils {
     }
 
     /**
-     * This method searches the availability of the port, if the requested port not available,this
-     * method will increment the port number and check the availability of that port, this process
-     * will continue until it reaches max port range which is MAX_PORT_RANGE.
+     * This method searches the availability of the port, if the requested port not available,this method will increment
+     * the port number and check the availability of that port, this process will continue until it reaches max port
+     * range which is MAX_PORT_RANGE.
      *
      * @param port the first port to check
      * @return the port that was found
@@ -129,9 +132,8 @@ public final class MessagingUtils {
     }
 
     /**
-     * This method searches the availability of the port, if the requested port not available,this
-     * method will increment the port number and check the availability, this process will continue
-     * until it find port available.
+     * This method searches the availability of the port, if the requested port not available,this method will increment
+     * the port number and check the availability, this process will continue until it find port available.
      *
      * @param port the first port to check
      * @return the port that was found
index b5663e4..eb4e021 100644 (file)
@@ -30,7 +30,9 @@ public final class ThreadUtilities {
     /**
      * Private constructor to prevent sub-classing of this class.
      */
-    private ThreadUtilities() {}
+    private ThreadUtilities() {
+        // Private constructor to prevent subclassing
+    }
 
     /**
      * Sleeps for the specified number of milliseconds, hiding interrupt handling.
index 1269d44..b73b98b 100644 (file)
@@ -53,6 +53,7 @@ import org.slf4j.ext.XLoggerFactory;
 // TODO: Auto-generated Javadoc
 /**
  * This class tests AADM use case.
+ * 
  * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
  *
  */
@@ -86,7 +87,7 @@ public class AadmUseCaseTest {
         ParameterService.register(contextParameters.getDistributorParameters());
         ParameterService.register(contextParameters.getLockManagerParameters());
         ParameterService.register(contextParameters.getPersistorParameters());
-        
+
         engineParameters = new EngineParameters();
         engineParameters.getExecutorParameterMap().put("MVEL", new MvelExecutorParameters());
         ParameterService.register(engineParameters);
@@ -98,7 +99,7 @@ public class AadmUseCaseTest {
     @After
     public void afterTest() {
         ParameterService.deregister(engineParameters);
-        
+
         ParameterService.deregister(contextParameters.getDistributorParameters());
         ParameterService.deregister(contextParameters.getLockManagerParameters());
         ParameterService.deregister(contextParameters.getPersistorParameters());
@@ -441,7 +442,9 @@ public class AadmUseCaseTest {
      * Test vpn cleardown.
      */
     @After
-    public void testAadmCleardown() {}
+    public void testAadmCleardown() {
+        // Not used
+    }
 
     /**
      * Gets the trigger event.
index 6eff2d8..3f2affb 100644 (file)
@@ -43,7 +43,9 @@ public abstract class AxConcept implements Serializable, Comparable<AxConcept> {
     /**
      * Default constructor.
      */
-    public AxConcept() {}
+    public AxConcept() {
+        // Default constructor
+    }
 
     /**
      * Copy constructor.
index 77ded31..cdbe623 100644 (file)
@@ -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}.
index 684ce32..e3bf59f 100644 (file)
@@ -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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
                         <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>
index 7ecb8fb..b11158c 100644 (file)
@@ -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
index cb0f799..4f43e6c 100644 (file)
@@ -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
index 692a925..670acb5 100644 (file)
@@ -6,21 +6,22 @@
   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=========================================================
 -->
 
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
-    <persistence-unit name="org.onap.policy.apex.core.model.eclipselink.runtime" transaction-type="RESOURCE_LOCAL">
+    <persistence-unit name="org.onap.policy.apex.core.model.eclipselink.runtime"
+        transaction-type="RESOURCE_LOCAL">
         <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 
         <class>org.onap.policy.apex.core.basicmodel.dao.converters.UUID2String</class>
@@ -76,7 +77,8 @@
         </properties>
     </persistence-unit>
 
-    <persistence-unit name="org.onap.policy.apex.core.model.eclipselink.test" transaction-type="RESOURCE_LOCAL">
+    <persistence-unit name="org.onap.policy.apex.core.model.eclipselink.test"
+        transaction-type="RESOURCE_LOCAL">
         <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 
         <class>org.onap.policy.apex.core.basicmodel.dao.converters.UUID2String</class>
 
             <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL94Dialect" />
             <property name="hibernate.hbm2ddl.auto" value="update" />
-            <property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider" />
+            <property name="hibernate.connection.provider_class"
+                value="org.hibernate.connection.C3P0ConnectionProvider" />
             <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />
             <property name="hibernate.c3p0.max_size" value="100" />
             <property name="hibernate.c3p0.min_size" value="0" />
             <property name="javax.persistence.jdbc.password" value="postgres" />
             <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL94Dialect" />
             <property name="hibernate.hbm2ddl.auto" value="create" />
-            <property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider" />
+            <property name="hibernate.connection.provider_class"
+                value="org.hibernate.connection.C3P0ConnectionProvider" />
             <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />
             <property name="hibernate.c3p0.max_size" value="100" />
             <property name="hibernate.c3p0.min_size" value="0" />
index b4c8737..60b394c 100644 (file)
@@ -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=========================================================
  */
@@ -29,7 +29,7 @@ import java.util.Map.Entry;
 
 /**
  * This static final class contains utility methods for Avro schemas.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public final class AvroSchemaKeyTranslationUtilities {
@@ -42,11 +42,13 @@ public final class AvroSchemaKeyTranslationUtilities {
     /**
      * Default constructor to avoid subclassing.
      */
-    private AvroSchemaKeyTranslationUtilities() {}
+    private AvroSchemaKeyTranslationUtilities() {
+        // Private constructor to prevent subclassing
+    }
 
     /**
-     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
-     * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+     * subsequently contain only [A-Za-z0-9_]
      *
      * @param jsonString The JSON string to translate
      * @param revert True if we want to revert the field names to their original values
@@ -58,8 +60,8 @@ public final class AvroSchemaKeyTranslationUtilities {
         }
 
         // Create a JSON element for the incoming JSON string
-        final JsonElement jsonElement =
-                new GsonBuilder().serializeNulls().create().fromJson(jsonString, JsonElement.class);
+        final JsonElement jsonElement = new GsonBuilder().serializeNulls().create().fromJson(jsonString,
+                JsonElement.class);
 
         final JsonElement translatedJsonElement = translateIllegalKeys(jsonElement, revert);
 
@@ -67,8 +69,8 @@ public final class AvroSchemaKeyTranslationUtilities {
     }
 
     /**
-     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
-     * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+     * subsequently contain only [A-Za-z0-9_]
      *
      * @param jsonElement The JSON element to translate
      * @param revert True if we want to revert the field names to their original values
@@ -86,8 +88,8 @@ public final class AvroSchemaKeyTranslationUtilities {
     }
 
     /**
-     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
-     * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+     * subsequently contain only [A-Za-z0-9_]
      *
      * @param jsonObject The JSON object to translate
      * @param revert True if we want to revert the field names to their original values
@@ -105,8 +107,8 @@ public final class AvroSchemaKeyTranslationUtilities {
     }
 
     /**
-     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start
-     * with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+     * Translate characters in JSON keys to values that are legal in Avro. Avro names must start with [A-Za-z_] and
+     * subsequently contain only [A-Za-z0-9_]
      *
      * @param jsonArray The JSON array to translate
      * @param revert True if we want to revert the field names to their original values
@@ -123,8 +125,8 @@ public final class AvroSchemaKeyTranslationUtilities {
     }
 
     /**
-     * Translate characters in a single JSON key to values that are legal in Avro. Avro names must
-     * start with [A-Za-z_] and subsequently contain only [A-Za-z0-9_]
+     * Translate characters in a single JSON key to values that are legal in Avro. Avro names must start with [A-Za-z_]
+     * and subsequently contain only [A-Za-z0-9_]
      *
      * @param key The key to translate
      * @param revert True if we want to revert the field names to their original values
index 4ba63a3..2af051e 100644 (file)
@@ -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,7 +33,7 @@ import org.onap.policy.common.parameters.ParameterException;
 
 /**
  * Test for an empty parameter file.
- * 
+ *
  * @author Liam Fallon (liam.fallon@ericsson.com)
  */
 public class ExecutorParameterTests {
@@ -44,14 +44,13 @@ public class ExecutorParameterTests {
 
     @Test
     public void noParamsTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorNoParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
             final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
-            assertEquals(0, parameters.getEngineServiceParameters().getEngineParameters().getExecutorParameterMap()
-                            .size());
+            assertEquals(0,
+                    parameters.getEngineServiceParameters().getEngineParameters().getExecutorParameterMap().size());
         } catch (final ParameterException e) {
             fail("This test should not throw any exception: " + e.getMessage());
         }
@@ -59,8 +58,7 @@ public class ExecutorParameterTests {
 
     @Test
     public void badParamsTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorBadParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -68,16 +66,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorBadParams.json\"\n"
-                            + "(ParameterRuntimeException):value of \"executorParameters:ZOOBY\" entry is not "
-                            + "a parameter JSON object", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorBadParams.json\"\n"
+                    + "(ParameterRuntimeException):value of \"executorParameters:ZOOBY\" entry is not "
+                    + "a parameter JSON object", e.getMessage());
         }
     }
 
     @Test
     public void noExecutorParamsTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -85,16 +82,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorNoExecutorParams.json\"\n"
-                            + "(ParameterRuntimeException):no \"executorParameters\" entry found in parameters,"
-                            + " at least one executor parameter entry must be specified", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorNoExecutorParams.json\"\n"
+                    + "(ParameterRuntimeException):no \"executorParameters\" entry found in parameters,"
+                    + " at least one executor parameter entry must be specified", e.getMessage());
         }
     }
 
     @Test
     public void emptyParamsTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -102,16 +98,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorEmptyParams.json\"\n"
-                            + "(ParameterRuntimeException):could not find field \"parameterClassName\" "
-                            + "in \"executorParameters:ZOOBY\" entry", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorEmptyParams.json\"\n"
+                    + "(ParameterRuntimeException):could not find field \"parameterClassName\" "
+                    + "in \"executorParameters:ZOOBY\" entry", e.getMessage());
         }
     }
 
     @Test
     public void badPluginParamNameTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -119,16 +114,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorBadPluginNameParams.json\"\n"
-                            + "(ParameterRuntimeException):could not find field \"parameterClassName\" "
-                            + "in \"executorParameters:ZOOBY\" entry", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorBadPluginNameParams.json\"\n"
+                    + "(ParameterRuntimeException):could not find field \"parameterClassName\" "
+                    + "in \"executorParameters:ZOOBY\" entry", e.getMessage());
         }
     }
 
     @Test
     public void badPluginParamObjectTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -136,16 +130,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json\"\n"
-                            + "(ParameterRuntimeException):value for field \"parameterClassName\" "
-                            + "of \"executorParameters:LOOBY\" entry is not a plain string", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json\"\n"
+                    + "(ParameterRuntimeException):value for field \"parameterClassName\" "
+                    + "of \"executorParameters:LOOBY\" entry is not a plain string", e.getMessage());
         }
     }
 
     @Test
     public void badPluginParamBlankTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -153,16 +146,15 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json\"\n"
-                            + "(ParameterRuntimeException):value for field \"parameterClassName\" "
-                            + "in \"executorParameters:LOOBY\" entry is not specified or is blank", e.getMessage());
+                    + "\"src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json\"\n"
+                    + "(ParameterRuntimeException):value for field \"parameterClassName\" "
+                    + "in \"executorParameters:LOOBY\" entry is not specified or is blank", e.getMessage());
         }
     }
 
     @Test
     public void badPluginParamValueTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -170,17 +162,16 @@ public class ExecutorParameterTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from"
-                            + " \"src/test/resources/parameters/serviceExecutorBadPluginValueParams.json\"\n"
-                            + "(ParameterRuntimeException):failed to deserialize the parameters "
-                            + "for \"executorParameters:LOOBY\" to parameter class \"helloworld\"\n"
-                            + "java.lang.ClassNotFoundException: helloworld", e.getMessage());
+                    + " \"src/test/resources/parameters/serviceExecutorBadPluginValueParams.json\"\n"
+                    + "(ParameterRuntimeException):failed to deserialize the parameters "
+                    + "for \"executorParameters:LOOBY\" to parameter class \"helloworld\"\n"
+                    + "java.lang.ClassNotFoundException: helloworld", e.getMessage());
         }
     }
 
     @Test
     public void goodParametersTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/goodParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -198,8 +189,14 @@ public class ExecutorParameterTests {
 
     @Test
     public void relativeParametersTest() {
-        final String[] args =
-            { "-rfr", "src/test/resources", "-c", "src/test/resources/parameters/goodParamsRelative.json" };
+        // @formatter:off
+        final String[] args = {
+            "-rfr",
+            "src/test/resources",
+            "-c",
+            "src/test/resources/parameters/goodParamsRelative.json"
+        };
+        // @formatter:on
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -211,7 +208,7 @@ public class ExecutorParameterTests {
             assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
             assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
             assertTrue(parameters.getEngineServiceParameters().getPolicyModelFileName()
-                            .endsWith("policymodels/SmallModel.json"));
+                    .endsWith("policymodels/SmallModel.json"));
         } catch (final ParameterException e) {
             fail("This test should not throw any exception: " + e.getMessage());
         }
index 5dd0011..e12bb61 100644 (file)
@@ -49,7 +49,7 @@ import org.onap.policy.common.parameters.ParameterException;
 public class ParameterTests {
     @Test
     public void invalidParametersNoFileTest() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/invalidNoFile.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/invalidNoFile.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -63,7 +63,7 @@ public class ParameterTests {
 
     @Test
     public void invalidParametersEmptyTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/empty.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/empty.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -77,7 +77,7 @@ public class ParameterTests {
 
     @Test
     public void invalidParametersNoParamsTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/noParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/noParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -98,7 +98,7 @@ public class ParameterTests {
 
     @Test
     public void invalidParametersBlankParamsTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/blankParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/blankParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -123,7 +123,7 @@ public class ParameterTests {
 
     @Test
     public void invalidParametersTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/badParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/badParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -169,7 +169,7 @@ public class ParameterTests {
 
     @Test
     public void modelNotFileTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/badParamsModelNotFile.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/badParamsModelNotFile.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -191,7 +191,7 @@ public class ParameterTests {
 
     @Test
     public void goodParametersTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -240,7 +240,7 @@ public class ParameterTests {
 
     @Test
     public void superDooperParametersTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/superDooperParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/superDooperParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -287,7 +287,7 @@ public class ParameterTests {
             assertEquals("some.key.deserailizer", superDooperParameters.getKeyDeserializer());
             assertEquals("some.value.deserailizer", superDooperParameters.getValueDeserializer());
 
-            final String[] consumerTopics = { "consumer-out-0", "consumer-out-1", "consumer-out-2" };
+            final String[] consumerTopics = {"consumer-out-0", "consumer-out-1", "consumer-out-2"};
             assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
         } catch (final ParameterException e) {
             fail("This test should not throw an exception");
index 792897f..20d54ae 100644 (file)
@@ -40,8 +40,7 @@ import org.onap.policy.common.parameters.ParameterException;
 public class ProducerConsumerTests {
     @Test
     public void goodParametersTest() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/goodParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -53,21 +52,21 @@ public class ProducerConsumerTests {
             assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
             assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
             assertEquals("FILE", parameters.getEventOutputParameters().get("FirstProducer")
-                            .getCarrierTechnologyParameters().getLabel());
-            assertEquals("JSON", parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters()
-                            .getLabel());
+                    .getCarrierTechnologyParameters().getLabel());
+            assertEquals("JSON",
+                    parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters().getLabel());
             assertEquals("FILE", parameters.getEventOutputParameters().get("MyOtherProducer")
-                            .getCarrierTechnologyParameters().getLabel());
+                    .getCarrierTechnologyParameters().getLabel());
             assertEquals("JSON", parameters.getEventOutputParameters().get("MyOtherProducer")
-                            .getEventProtocolParameters().getLabel());
+                    .getEventProtocolParameters().getLabel());
             assertEquals("FILE", parameters.getEventInputParameters().get("TheFileConsumer1")
-                            .getCarrierTechnologyParameters().getLabel());
+                    .getCarrierTechnologyParameters().getLabel());
             assertEquals("JSON", parameters.getEventInputParameters().get("TheFileConsumer1")
-                            .getEventProtocolParameters().getLabel());
+                    .getEventProtocolParameters().getLabel());
             assertEquals("SUPER_DOOPER", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
-                            .getCarrierTechnologyParameters().getLabel());
+                    .getCarrierTechnologyParameters().getLabel());
             assertEquals("SUPER_TOK_DEL", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
-                            .getEventProtocolParameters().getLabel());
+                    .getEventProtocolParameters().getLabel());
         } catch (final ParameterException e) {
             fail("This test should not throw an exception");
         }
@@ -75,8 +74,7 @@ public class ProducerConsumerTests {
 
     @Test
     public void noCarrierTechnology() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsNoCT.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsNoCT.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -84,21 +82,20 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/prodConsNoCT.json\"\n"
-                            + "parameter group \"APEX_PARAMETERS\" type "
-                            + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
-                            + "parameter group has status INVALID\n"
-                            + "  parameter group map \"eventInputParameters\" INVALID, "
-                            + "parameter group map has status INVALID\n" + "    parameter group \"aConsumer\" type "
-                            + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID,"
-                            + " parameter group has status INVALID\n" + "      parameter group \"UNDEFINED\" INVALID, "
-                            + "event handler carrierTechnologyParameters not specified or blank\n", e.getMessage());
+                    + "parameter group \"APEX_PARAMETERS\" type "
+                    + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
+                    + "parameter group has status INVALID\n"
+                    + "  parameter group map \"eventInputParameters\" INVALID, "
+                    + "parameter group map has status INVALID\n" + "    parameter group \"aConsumer\" type "
+                    + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID,"
+                    + " parameter group has status INVALID\n" + "      parameter group \"UNDEFINED\" INVALID, "
+                    + "event handler carrierTechnologyParameters not specified or blank\n", e.getMessage());
         }
     }
 
     @Test
     public void noEventProcol() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsNoEP.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsNoEP.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -106,30 +103,29 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/prodConsNoEP.json\"\n"
-                            + "parameter group \"APEX_PARAMETERS\" type "
-                            + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
-                            + "parameter group has status INVALID\n"
-                            + "  parameter group map \"eventOutputParameters\" INVALID, "
-                            + "parameter group map has status INVALID\n" + "    parameter group \"aProducer\" type "
-                            + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID"
-                            + ", parameter group has status INVALID\n" + "      parameter group \"UNDEFINED\" INVALID, "
-                            + "event handler eventProtocolParameters not specified or blank\n"
-                            + "  parameter group map \"eventInputParameters\" INVALID, "
-                            + "parameter group map has status INVALID\n" + "    parameter group \"aConsumer\" type "
-                            + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID"
-                            + ", parameter group has status INVALID\n" + "      parameter group \"FILE\" type "
-                            + "\"org.onap.policy.apex.service.engine.event.impl."
-                            + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, "
-                            + "parameter group has status INVALID\n"
-                            + "        field \"fileName\" type \"java.lang.String\" value \"null\" INVALID, "
-                            + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage());
+                    + "parameter group \"APEX_PARAMETERS\" type "
+                    + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
+                    + "parameter group has status INVALID\n"
+                    + "  parameter group map \"eventOutputParameters\" INVALID, "
+                    + "parameter group map has status INVALID\n" + "    parameter group \"aProducer\" type "
+                    + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID"
+                    + ", parameter group has status INVALID\n" + "      parameter group \"UNDEFINED\" INVALID, "
+                    + "event handler eventProtocolParameters not specified or blank\n"
+                    + "  parameter group map \"eventInputParameters\" INVALID, "
+                    + "parameter group map has status INVALID\n" + "    parameter group \"aConsumer\" type "
+                    + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID"
+                    + ", parameter group has status INVALID\n" + "      parameter group \"FILE\" type "
+                    + "\"org.onap.policy.apex.service.engine.event.impl."
+                    + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, "
+                    + "parameter group has status INVALID\n"
+                    + "        field \"fileName\" type \"java.lang.String\" value \"null\" INVALID, "
+                    + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage());
         }
     }
 
     @Test
     public void noCarrierTechnologyParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsNoCTParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsNoCTParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -137,15 +133,14 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from \"src/test/resources/parameters/prodConsNoCTParClass.json\"\n"
-                            + "(ParameterRuntimeException):carrier technology \"SUPER_DOOPER\" "
-                            + "parameter \"parameterClassName\" value \"null\" invalid in JSON file", e.getMessage());
+                    + "(ParameterRuntimeException):carrier technology \"SUPER_DOOPER\" "
+                    + "parameter \"parameterClassName\" value \"null\" invalid in JSON file", e.getMessage());
         }
     }
 
     @Test
     public void mismatchCarrierTechnologyParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -153,45 +148,44 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/prodConsMismatchCTParClass.json\"\n"
-                            + "(ParameterRuntimeException):carrier technology \"SUPER_LOOPER\" "
-                            + "does not match plugin \"SUPER_DOOPER\" in \"" + "org.onap.policy.apex.service.engine."
-                            + "parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
-                            + "\", specify correct carrier technology parameter plugin "
-                            + "in parameter \"parameterClassName\"", e.getMessage());
+                    + "\"src/test/resources/parameters/prodConsMismatchCTParClass.json\"\n"
+                    + "(ParameterRuntimeException):carrier technology \"SUPER_LOOPER\" "
+                    + "does not match plugin \"SUPER_DOOPER\" in \"" + "org.onap.policy.apex.service.engine."
+                    + "parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+                    + "\", specify correct carrier technology parameter plugin "
+                    + "in parameter \"parameterClassName\"", e.getMessage());
         }
     }
 
     @Test
     public void wrongTypeCarrierTechnologyParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
             new ApexParameterHandler().getParameters(arguments);
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
-            assertEquals("error reading parameters from "
+            assertEquals(
+                    "error reading parameters from "
                             + "\"src/test/resources/parameters/prodConsWrongTypeCTParClass.json\"\n"
                             + "(ParameterRuntimeException):could not create default parameters for carrier technology "
                             + "\"SUPER_DOOPER\"\n" + "org.onap.policy.apex.service.engine.parameters.dummyclasses."
                             + "SuperTokenDelimitedEventProtocolParameters cannot be cast to "
                             + "org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters",
-                            e.getMessage());
+                    e.getMessage());
         }
     }
 
     @Test
     public void okFileNameCarrierTechnology() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsOKFileName.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsOKFileName.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
             final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
             final FileCarrierTechnologyParameters fileParams = (FileCarrierTechnologyParameters) parameters
-                            .getEventOutputParameters().get("aProducer").getCarrierTechnologyParameters();
+                    .getEventOutputParameters().get("aProducer").getCarrierTechnologyParameters();
             assertTrue(fileParams.getFileName().endsWith("target/aaa.json"));
             assertEquals(false, fileParams.isStandardError());
             assertEquals(false, fileParams.isStandardIo());
@@ -203,8 +197,7 @@ public class ProducerConsumerTests {
 
     @Test
     public void badFileNameCarrierTechnology() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsBadFileName.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsBadFileName.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -212,45 +205,44 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("validation error(s) on parameters from "
-                            + "\"src/test/resources/parameters/prodConsBadFileName.json\"\n"
-                            + "parameter group \"APEX_PARAMETERS\" type "
-                            + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
-                            + "parameter group has status INVALID\n"
-                            + "  parameter group map \"eventOutputParameters\" INVALID, "
-                            + "parameter group map has status INVALID\n" + "    parameter group \"aProducer\" type "
-                            + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" "
-                            + "INVALID, parameter group has status INVALID\n" + "      parameter group \"FILE\" type "
-                            + "\"org.onap.policy.apex.service.engine.event.impl."
-                            + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, "
-                            + "parameter group has status INVALID\n" + "        field \"fileName\" type "
-                            + "\"java.lang.String\" value \"null\" INVALID, "
-                            + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage());
+                    + "\"src/test/resources/parameters/prodConsBadFileName.json\"\n"
+                    + "parameter group \"APEX_PARAMETERS\" type "
+                    + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, "
+                    + "parameter group has status INVALID\n"
+                    + "  parameter group map \"eventOutputParameters\" INVALID, "
+                    + "parameter group map has status INVALID\n" + "    parameter group \"aProducer\" type "
+                    + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" "
+                    + "INVALID, parameter group has status INVALID\n" + "      parameter group \"FILE\" type "
+                    + "\"org.onap.policy.apex.service.engine.event.impl."
+                    + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, "
+                    + "parameter group has status INVALID\n" + "        field \"fileName\" type "
+                    + "\"java.lang.String\" value \"null\" INVALID, "
+                    + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage());
         }
     }
 
     @Test
     public void badEventProtocolParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsBadEPParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsBadEPParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
             new ApexParameterHandler().getParameters(arguments);
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
-            assertEquals("error reading parameters from \"src/test/resources/parameters/prodConsBadEPParClass.json\"\n"
+            assertEquals(
+                    "error reading parameters from \"src/test/resources/parameters/prodConsBadEPParClass.json\"\n"
                             + "(ParameterRuntimeException):event protocol \"SUPER_TOK_DEL\" "
                             + "does not match plugin \"JSON\" in \"org.onap.policy.apex.service.engine.event.impl"
                             + ".jsonprotocolplugin.JsonEventProtocolParameters"
                             + "\", specify correct event protocol parameter plugin in parameter \"parameterClassName\"",
-                            e.getMessage());
+                    e.getMessage());
         }
     }
 
     @Test
     public void noEventProtocolParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsNoEPParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsNoEPParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -258,36 +250,35 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from \"src/test/resources/parameters/prodConsNoEPParClass.json\"\n"
-                            + "(ParameterRuntimeException):event protocol \"SUPER_TOK_DEL\" parameter "
-                            + "\"parameterClassName\" value \"null\" invalid in JSON file", e.getMessage());
+                    + "(ParameterRuntimeException):event protocol \"SUPER_TOK_DEL\" parameter "
+                    + "\"parameterClassName\" value \"null\" invalid in JSON file", e.getMessage());
         }
     }
 
     @Test
     public void mismatchEventProtocolParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
             new ApexParameterHandler().getParameters(arguments);
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
-            assertEquals("error reading parameters from "
+            assertEquals(
+                    "error reading parameters from "
                             + "\"src/test/resources/parameters/prodConsMismatchEPParClass.json\"\n"
                             + "(ParameterRuntimeException):event protocol \"SUPER_TOK_BEL\" "
                             + "does not match plugin \"SUPER_TOK_DEL\" in "
                             + "\"org.onap.policy.apex.service.engine.parameters.dummyclasses."
                             + "SuperTokenDelimitedEventProtocolParameters\", "
                             + "specify correct event protocol parameter plugin in parameter \"parameterClassName\"",
-                            e.getMessage());
+                    e.getMessage());
         }
     }
 
     @Test
     public void wrongTypeEventProtocolParClass() {
-        final String[] args =
-            { "-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -295,12 +286,12 @@ public class ProducerConsumerTests {
             fail("This test should throw an exception");
         } catch (final ParameterException e) {
             assertEquals("error reading parameters from "
-                            + "\"src/test/resources/parameters/prodConsWrongTypeEPParClass.json\"\n"
-                            + "(ParameterRuntimeException):could not create default parameters for event protocol "
-                            + "\"SUPER_TOK_DEL\"\n" + "org.onap.policy.apex.service.engine."
-                            + "parameters.dummyclasses.SuperDooperCarrierTechnologyParameters "
-                            + "cannot be cast to org.onap.policy.apex.service."
-                            + "parameters.eventprotocol.EventProtocolParameters", e.getMessage());
+                    + "\"src/test/resources/parameters/prodConsWrongTypeEPParClass.json\"\n"
+                    + "(ParameterRuntimeException):could not create default parameters for event protocol "
+                    + "\"SUPER_TOK_DEL\"\n" + "org.onap.policy.apex.service.engine."
+                    + "parameters.dummyclasses.SuperDooperCarrierTechnologyParameters "
+                    + "cannot be cast to org.onap.policy.apex.service."
+                    + "parameters.eventprotocol.EventProtocolParameters", e.getMessage());
         }
     }
 }
index 153913b..3da6828 100644 (file)
@@ -46,7 +46,7 @@ import org.onap.policy.common.parameters.ParameterException;
 public class SyncParameterTests {
     @Test
     public void syncBadNoSyncWithPeer() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -68,7 +68,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncBadNotSyncWithPeer() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -90,7 +90,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncBadSyncBadPeers() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadPeers.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadPeers.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -123,7 +123,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncBadSyncInvalidTimeout() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -158,7 +158,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncBadSyncBadTimeout() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -180,7 +180,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncBadSyncUnpairedTimeout() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -217,7 +217,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncGoodSyncGoodTimeoutProducer() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -237,7 +237,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncGoodSyncGoodTimeoutConsumer() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -257,7 +257,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncGoodSyncGoodTimeoutBoth() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -277,7 +277,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncUnusedConsumerPeers() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -306,7 +306,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncMismatchedPeers() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedPeers.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncMismatchedPeers.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -343,7 +343,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncUnusedProducerPeers() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncUnusedProducerPeers.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncUnusedProducerPeers.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -370,7 +370,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncMismatchedTimeout() throws ParameterException {
-        final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedTimeout.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncMismatchedTimeout.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -399,7 +399,7 @@ public class SyncParameterTests {
 
     @Test
     public void syncGoodParametersTest() {
-        final String[] args = { "-c", "src/test/resources/parameters/syncGoodParams.json" };
+        final String[] args = {"-c", "src/test/resources/parameters/syncGoodParams.json"};
         final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
 
         try {
@@ -463,7 +463,7 @@ public class SyncParameterTests {
             assertEquals("org.apache.superDooper.common.serialization.StringDeserializer",
                     superDooperParameters.getValueDeserializer());
 
-            final String[] consumerTopics = { "apex-in" };
+            final String[] consumerTopics = {"apex-in"};
             assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
         } catch (final ParameterException e) {
             fail("This test should not throw an exception");
index 6ce7d4a..3e5ed14 100644 (file)
@@ -31,7 +31,9 @@ import org.onap.policy.apex.core.engine.executor.exception.StateMachineException
  * Dummy state finalizer executor for testing.
  */
 public class DummyStateFinalizerExecutor extends StateFinalizerExecutor {
-    public DummyStateFinalizerExecutor() {}
+    public DummyStateFinalizerExecutor() {
+        // Default constructor
+    }
 
     @Override
     public String execute(final long executionId, final Properties executorProperties,
index 9a93a1f..a4312bf 100644 (file)
@@ -34,10 +34,14 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTask;
  * Dummy task executor for testing.
  */
 public class DummyTaskExecutor extends TaskExecutor {
-    public DummyTaskExecutor() {}
+    public DummyTaskExecutor() {
+        // Default constructor
+    }
 
     @Override
-    public void prepare() throws StateMachineException {}
+    public void prepare() throws StateMachineException {
+        // Not used
+    }
 
     @Override
     public Map<String, Object> execute(final long executionId, final Properties executorProperties,
@@ -54,5 +58,7 @@ public class DummyTaskExecutor extends TaskExecutor {
     }
 
     @Override
-    public void cleanUp() throws StateMachineException {}
+    public void cleanUp() throws StateMachineException {
+        // Not used
+    }
 }
index cf41d86..f300084 100644 (file)
@@ -32,10 +32,13 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
  * Dummy task selection executor for testing.
  */
 public class DummyTaskSelectExecutor extends TaskSelectExecutor {
-    public DummyTaskSelectExecutor() {}
+    public DummyTaskSelectExecutor() {
+    }
 
     @Override
-    public void prepare() throws StateMachineException {}
+    public void prepare() throws StateMachineException {
+        // Not used
+    }
 
     @Override
     public AxArtifactKey execute(final long executionId, final Properties executorProperties,
@@ -45,5 +48,7 @@ public class DummyTaskSelectExecutor extends TaskSelectExecutor {
     }
 
     @Override
-    public void cleanUp() throws StateMachineException {}
+    public void cleanUp() throws StateMachineException {
+        // Not used
+    }
 }
index 6acca27..42fd6e1 100644 (file)
@@ -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=========================================================
  */
@@ -47,8 +47,7 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
     private static final int DEFAULT_SESSION_TIMEOUT = 30000;
     private static final String DEFAULT_PRODUCER_TOPIC = "apex-out";
     private static final int DEFAULT_CONSUMER_POLL_TIME = 100;
-    private static final String[] DEFAULT_CONSUMER_TOPIC_LIST =
-        { "apex-in" };
+    private static final String[] DEFAULT_CONSUMER_TOPIC_LIST = {"apex-in"};
     private static final String DEFAULT_KEYSERZER = "org.apache.superDooper.common.serialization.StringSerializer";
     private static final String DEFAULT_VALSERZER = "org.apache.superDooper.common.serialization.StringSerializer";
     private static final String DEFAULT_KEYDESZER = "org.apache.superDooper.common.serialization.StringDeserializer";
@@ -99,9 +98,9 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
         // Set the carrier technology properties for the FILE carrier technology
         this.setLabel("SUPER_DOOPER");
         this.setEventProducerPluginClass(
-                        "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventProducer");
+                "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventProducer");
         this.setEventConsumerPluginClass(
-                        "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventSubscriber");
+                "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventSubscriber");
     }
 
     /**
@@ -466,32 +465,32 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
 
         if (bootstrapServers == null || bootstrapServers.trim().length() == 0) {
             result.setResult("bootstrapServers", ValidationStatus.INVALID,
-                            "bootstrapServers not specified, must be specified as a string of form host:port");
+                    "bootstrapServers not specified, must be specified as a string of form host:port");
         }
 
         if (acks == null || acks.trim().length() == 0) {
             result.setResult("acks", ValidationStatus.INVALID,
-                            "acks not specified, must be specified as a string with values [0|1|all]");
+                    "acks not specified, must be specified as a string with values [0|1|all]");
         }
 
         if (retries < 0) {
             result.setResult("retries", ValidationStatus.INVALID,
-                            "[" + retries + "] invalid, must be specified as retries >= 0");
+                    "[" + retries + "] invalid, must be specified as retries >= 0");
         }
 
         if (batchSize < 0) {
             result.setResult("batchSize", ValidationStatus.INVALID,
-                            "[" + batchSize + "] invalid, must be specified as batchSize >= 0");
+                    "[" + batchSize + "] invalid, must be specified as batchSize >= 0");
         }
 
         if (lingerTime < 0) {
             result.setResult("lingerTime", ValidationStatus.INVALID,
-                            "[" + lingerTime + "] invalid, must be specified as lingerTime >= 0");
+                    "[" + lingerTime + "] invalid, must be specified as lingerTime >= 0");
         }
 
         if (bufferMemory < 0) {
             result.setResult("bufferMemory", ValidationStatus.INVALID,
-                            "[" + bufferMemory + "] invalid, must be specified as bufferMemory >= 0");
+                    "[" + bufferMemory + "] invalid, must be specified as bufferMemory >= 0");
         }
 
         if (groupId == null || groupId.trim().length() == 0) {
@@ -500,34 +499,34 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
 
         if (autoCommitTime < 0) {
             result.setResult("autoCommitTime", ValidationStatus.INVALID,
-                            "[" + autoCommitTime + "] invalid, must be specified as autoCommitTime >= 0");
+                    "[" + autoCommitTime + "] invalid, must be specified as autoCommitTime >= 0");
         }
 
         if (sessionTimeout < 0) {
-            result.setResult("sessionTimeout", ValidationStatus.INVALID, "sessionTimeout [" + sessionTimeout
-                            + "] invalid, must be specified as sessionTimeout >= 0");
+            result.setResult("sessionTimeout", ValidationStatus.INVALID,
+                    "sessionTimeout [" + sessionTimeout + "] invalid, must be specified as sessionTimeout >= 0");
         }
 
         if (producerTopic == null || producerTopic.trim().length() == 0) {
             result.setResult("producerTopic", ValidationStatus.INVALID,
-                            "producerTopic not specified, must be specified as a string");
+                    "producerTopic not specified, must be specified as a string");
         }
 
         if (consumerPollTime < 0) {
             result.setResult("consumerPollTime", ValidationStatus.INVALID,
-                            "[" + consumerPollTime + "] invalid, must be specified as consumerPollTime >= 0");
+                    "[" + consumerPollTime + "] invalid, must be specified as consumerPollTime >= 0");
         }
 
         if (consumerTopicList == null || consumerTopicList.length == 0) {
             result.setResult("consumerTopicList", ValidationStatus.INVALID,
-                            "not specified, must be specified as a list of strings");
+                    "not specified, must be specified as a list of strings");
         }
 
         StringBuilder consumerTopicMessageBuilder = new StringBuilder();
         for (final String consumerTopic : consumerTopicList) {
             if (consumerTopic == null || consumerTopic.trim().length() == 0) {
                 consumerTopicMessageBuilder.append("  invalid consumer topic \"" + consumerTopic
-                                + "\" specified on consumerTopicList, consumer topics must be specified as strings");
+                        + "\" specified on consumerTopicList, consumer topics must be specified as strings");
             }
         }
 
@@ -541,17 +540,17 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
 
         if (valueSerializer == null || valueSerializer.trim().length() == 0) {
             result.setResult("valueSerializer", ValidationStatus.INVALID,
-                            "not specified, must be specified as a string");
+                    "not specified, must be specified as a string");
         }
 
         if (keyDeserializer == null || keyDeserializer.trim().length() == 0) {
             result.setResult("keyDeserializer", ValidationStatus.INVALID,
-                            "not specified, must be specified as a string");
+                    "not specified, must be specified as a string");
         }
 
         if (valueDeserializer == null || valueDeserializer.trim().length() == 0) {
             result.setResult("valueDeserializer", ValidationStatus.INVALID,
-                            "not specified, must be specified as a string");
+                    "not specified, must be specified as a string");
         }
 
         return result;
index a87f942..8e1dfce 100644 (file)
@@ -42,7 +42,9 @@ public class SuperDooperEventProducer implements ApexEventProducer {
 
     private String name;
 
-    public SuperDooperEventProducer() {}
+    public SuperDooperEventProducer() {
+        // Default constructor
+    }
 
     /**
      * {@inheritDoc}.
@@ -72,7 +74,9 @@ public class SuperDooperEventProducer implements ApexEventProducer {
      * {@inheritDoc}.
      */
     @Override
-    public void setPeeredReference(final EventHandlerPeeredMode peeredMode, final PeeredReference peeredReference) {}
+    public void setPeeredReference(final EventHandlerPeeredMode peeredMode, final PeeredReference peeredReference) {
+        // Not used
+    }
 
     /**
      * {@inheritDoc}.
@@ -80,13 +84,15 @@ public class SuperDooperEventProducer implements ApexEventProducer {
     @Override
     public void sendEvent(final long executionId, final Properties executionProperties, final String eventName,
             final Object event) {
-        LOGGER.info("Sending Event: " + this.getClass().getName() + ":" + this.name + " ... event ("
-                + eventName + ") : " + event);
+        LOGGER.info("Sending Event: " + this.getClass().getName() + ":" + this.name + " ... event (" + eventName
+                + ") : " + event);
     }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void stop() {}
+    public void stop() {
+        // Not used
+    }
 }
index c945480..8eb1ca1 100644 (file)
@@ -41,7 +41,7 @@ public class SuperDooperEventSubscriber implements ApexEventConsumer {
 
     @Override
     public void init(final String name, final EventHandlerParameters consumerParameters,
-                    final ApexEventReceiver apexEventReceiver) throws ApexEventException {
+            final ApexEventReceiver apexEventReceiver) throws ApexEventException {
         this.name = name;
         LOGGER.info("Initialising Apex Consumer: " + this.getClass().getName() + ":" + this.name);
     }
@@ -68,12 +68,13 @@ public class SuperDooperEventSubscriber implements ApexEventConsumer {
 
     @Override
     public void start() {
-        // TODO Auto-generated method stub
+        // Not used
 
     }
 
     @Override
     public void stop() {
+        // Not used
     }
 
 }
index 678961d..bb414c2 100644 (file)
@@ -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=========================================================
  */
@@ -46,5 +46,7 @@ public final class SuperTokenDelimitedEventConverter implements ApexEventProtoco
     }
 
     @Override
-    public void init(final EventProtocolParameters parameters) {}
+    public void init(final EventProtocolParameters parameters) {
+        // Not used
+    }
 }
index 9197dfe..89212fc 100644 (file)
@@ -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 @@ public class SuperTokenDelimitedEventProtocolParameters extends EventProtocolTex
     private static final String SUPER_TOKEN_DELIMITER = "SuperToken";
 
     /**
-     * Constructor to create a JSON event protocol parameter instance and register the instance with
-     * the parameter service.
+     * Constructor to create a JSON event protocol parameter instance and register the instance with the parameter
+     * service.
      */
     public SuperTokenDelimitedEventProtocolParameters() {
         super();
index cdbd27b..6f2474a 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.policy.apex.services.onappf.parameters.dummyclasses;
 
 import java.util.Map;
 import java.util.Properties;
+
 import org.onap.policy.apex.context.ContextException;
 import org.onap.policy.apex.core.engine.executor.StateFinalizerExecutor;
 import org.onap.policy.apex.core.engine.executor.exception.StateMachineException;
@@ -31,7 +32,9 @@ import org.onap.policy.apex.core.engine.executor.exception.StateMachineException
  * Dummy state finalizer executor for testing.
  */
 public class DummyStateFinalizerExecutor extends StateFinalizerExecutor {
-    public DummyStateFinalizerExecutor() {}
+    public DummyStateFinalizerExecutor() {
+        // Default constructor
+    }
 
     @Override
     public String execute(final long executionId, final Properties executorProperties,
index d3fa9b5..387479b 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.policy.apex.services.onappf.parameters.dummyclasses;
 
 import java.util.Map;
 import java.util.Properties;
+
 import org.onap.policy.apex.context.ContextException;
 import org.onap.policy.apex.core.engine.event.EnEvent;
 import org.onap.policy.apex.core.engine.executor.TaskExecutor;
@@ -34,10 +35,14 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTask;
  * Dummy task executor for testing.
  */
 public class DummyTaskExecutor extends TaskExecutor {
-    public DummyTaskExecutor() {}
+    public DummyTaskExecutor() {
+        // Default constructor
+    }
 
     @Override
-    public void prepare() throws StateMachineException {}
+    public void prepare() throws StateMachineException {
+        // Not used
+    }
 
     @Override
     public Map<String, Object> execute(final long executionId, final Properties executorProperties,
@@ -54,5 +59,7 @@ public class DummyTaskExecutor extends TaskExecutor {
     }
 
     @Override
-    public void cleanUp() throws StateMachineException {}
+    public void cleanUp() throws StateMachineException {
+        // Not used
+    }
 }
index b27ff6e..b6e0dd4 100644 (file)
@@ -22,6 +22,7 @@
 package org.onap.policy.apex.services.onappf.parameters.dummyclasses;
 
 import java.util.Properties;
+
 import org.onap.policy.apex.context.ContextException;
 import org.onap.policy.apex.core.engine.event.EnEvent;
 import org.onap.policy.apex.core.engine.executor.TaskSelectExecutor;
@@ -32,10 +33,13 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
  * Dummy task selection executor for testing.
  */
 public class DummyTaskSelectExecutor extends TaskSelectExecutor {
-    public DummyTaskSelectExecutor() {}
+    public DummyTaskSelectExecutor() {
+    }
 
     @Override
-    public void prepare() throws StateMachineException {}
+    public void prepare() throws StateMachineException {
+        // Not used
+    }
 
     @Override
     public AxArtifactKey execute(final long executionId, final Properties executorProperties,
@@ -45,5 +49,7 @@ public class DummyTaskSelectExecutor extends TaskSelectExecutor {
     }
 
     @Override
-    public void cleanUp() throws StateMachineException {}
+    public void cleanUp() throws StateMachineException {
+        // Not used
+    }
 }
index 8786d40..208571a 100644 (file)
@@ -38,7 +38,9 @@ public class TestContextBooleanItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextBooleanItem() {}
+    public TestContextBooleanItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 4a0746c..b152f27 100644 (file)
@@ -36,7 +36,9 @@ public class TestContextByteItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextByteItem() {}
+    public TestContextByteItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index aa3830a..e67ba5e 100644 (file)
@@ -37,7 +37,9 @@ public class TestContextDoubleItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextDoubleItem() {}
+    public TestContextDoubleItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 350f2ba..fec1c25 100644 (file)
@@ -36,7 +36,9 @@ public class TestContextFloatItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextFloatItem() {}
+    public TestContextFloatItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index a565583..ea76f70 100644 (file)
@@ -36,7 +36,9 @@ public class TestContextIntItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextIntItem() {}
+    public TestContextIntItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 1c3d5bf..dc18da5 100644 (file)
@@ -37,7 +37,9 @@ public class TestContextLongItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextLongItem() {}
+    public TestContextLongItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 20a7492..fb1e931 100644 (file)
@@ -36,7 +36,9 @@ public class TestContextLongObjectItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextLongObjectItem() {}
+    public TestContextLongObjectItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 02f39da..16a180a 100644 (file)
@@ -36,7 +36,9 @@ public class TestContextStringItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextStringItem() {}
+    public TestContextStringItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 4a5c750..3e3aae1 100644 (file)
@@ -38,7 +38,9 @@ public class TestContextTreeMapItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextTreeMapItem() {}
+    public TestContextTreeMapItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 610dc10..7c83d48 100644 (file)
@@ -40,7 +40,9 @@ public class TestContextTreeSetItem implements Serializable {
     /**
      * The Constructor.
      */
-    public TestContextTreeSetItem() {}
+    public TestContextTreeSetItem() {
+        // Default constructor
+    }
 
     /**
      * The Constructor.
index 45ea0fd..4abbc20 100644 (file)
@@ -60,7 +60,9 @@ public final class TestContextAlbumFactory {
     /**
      * Default constructor to prevent sub-classing.
      */
-    private TestContextAlbumFactory() {}
+    private TestContextAlbumFactory() {
+        // Private constructor to block subclassing
+    }
 
     /**
      * Creates the policy context model.
index 6fdcf61..bf0c57a 100644 (file)
@@ -68,7 +68,9 @@ public class Constants {
     /**
      * Instantiates a new constants.
      */
-    private Constants() {}
+    private Constants() {
+        // Private constructor to block subclassing
+    }
 
     /**
      * Gets the ax artifact key array.
index ac43b71..30bc8d8 100644 (file)
@@ -37,12 +37,14 @@ public class NetworkUtils {
     /**
      * Instantiates a new network utils.
      */
-    private NetworkUtils() {}
+    private NetworkUtils() {
+        // Private constructor to block subclassing
+    }
 
     /**
-     * The JGroups IP address must be set to a real (not loopback) IP address for Infinispan to
-     * work. In order to ensure that all the JVMs in a test pick up the same IP address, this
-     * function sets the address to be the first non-loopback IPv4 address on a host
+     * The JGroups IP address must be set to a real (not loopback) IP address for Infinispan to work. In order to ensure
+     * that all the JVMs in a test pick up the same IP address, this function sets the address to be the first
+     * non-loopback IPv4 address on a host
      *
      * @return Set of IPv4 addresses
      * @throws SocketException throw socket exception if error occurs
@@ -63,5 +65,4 @@ public class NetworkUtils {
         return ipAddressSet;
     }
 
-
 }
index a84a737..79a3d06 100644 (file)
@@ -6,23 +6,25 @@
   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=========================================================
 -->
 
-<config xmlns="urn:org:jgroups"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
-   <UDP mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
+<config
+    xmlns="urn:org:jgroups"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups-4.0.xsd">
+    <UDP
+        mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
         mcast_port="${jgroups.udp.mcast_port:46655}"
         bind_port="${jgroups.udp.mcast.bind_port:63005}"
         bind_addr="${jgroups.udp.mcast.bind_addr:127.0.0.1}"
 
         thread_pool.min_threads="${jgroups.thread_pool.min_threads:0}"
         thread_pool.max_threads="${jgroups.thread_pool.max_threads:200}"
-        thread_pool.keep_alive_time="60000"
-   />
-   <PING />
-   <MERGE3 min_interval="10000" 
-           max_interval="30000" 
-   />
-   <FD_SOCK />
-   <FD_SOCK bind_addr="${jgroups.udp.mcast.bind_addr:127.0.0.1}" sock_conn_timeout="60000" start_port="${jgroups.udp.fd.sock.start_port:63010}" port_range="1000"/>
-   
-   <FD_ALL timeout="60000" 
-           interval="15000" 
-           timeout_check_interval="5000" 
-   />
-   <VERIFY_SUSPECT timeout="5000"  />
-   <pbcast.NAKACK2 xmit_interval="100"
-                   xmit_table_num_rows="50"
-                   xmit_table_msgs_per_row="1024"
-                   xmit_table_max_compaction_time="30000"
-                   resend_last_seqno="true"
-   />
-   <UNICAST3 xmit_interval="100"
-             xmit_table_num_rows="50"
-             xmit_table_msgs_per_row="1024"
-             xmit_table_max_compaction_time="30000"
-             conn_expiry_timeout="0"
-   />
-   <pbcast.STABLE stability_delay="500"
-                  desired_avg_gossip="5000"
-                  max_bytes="1M"
-   />
-   <pbcast.GMS print_local_addr="false"
-               install_view_locally_first="true"
-               join_timeout="${jgroups.join_timeout:5000}"
-   />
-   <UFC max_credits="2m" 
-        min_threshold="0.40"
-   />
-   <MFC max_credits="2m" 
-        min_threshold="0.40"
-   />
-   <FRAG3 frag_size="8000"/>
+        thread_pool.keep_alive_time="60000" />
+    <PING />
+    <MERGE3
+        min_interval="10000"
+        max_interval="30000" />
+    <FD_SOCK />
+    <FD_SOCK
+        bind_addr="${jgroups.udp.mcast.bind_addr:127.0.0.1}"
+        sock_conn_timeout="60000"
+        start_port="${jgroups.udp.fd.sock.start_port:63010}"
+        port_range="1000" />
+
+    <FD_ALL
+        timeout="60000"
+        interval="15000"
+        timeout_check_interval="5000" />
+    <VERIFY_SUSPECT timeout="5000" />
+    <pbcast.NAKACK2
+        xmit_interval="100"
+        xmit_table_num_rows="50"
+        xmit_table_msgs_per_row="1024"
+        xmit_table_max_compaction_time="30000"
+        resend_last_seqno="true" />
+    <UNICAST3
+        xmit_interval="100"
+        xmit_table_num_rows="50"
+        xmit_table_msgs_per_row="1024"
+        xmit_table_max_compaction_time="30000"
+        conn_expiry_timeout="0" />
+    <pbcast.STABLE
+        stability_delay="500"
+        desired_avg_gossip="5000"
+        max_bytes="1M" />
+    <pbcast.GMS
+        print_local_addr="false"
+        install_view_locally_first="true"
+        join_timeout="${jgroups.join_timeout:5000}" />
+    <UFC
+        max_credits="2m"
+        min_threshold="0.40" />
+    <MFC
+        max_credits="2m"
+        min_threshold="0.40" />
+    <FRAG3 frag_size="8000" />
 </config>
index 75f84b7..94bf0c8 100644 (file)
@@ -71,12 +71,12 @@ public class TestContextUpdateModel {
     @Before
     public void beforeTest() {
         schemaParameters = new SchemaParameters();
-        
+
         schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
         schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
 
         ParameterService.register(schemaParameters);
-        
+
         contextParameters = new ContextParameters();
 
         contextParameters.setName(ContextParameterConstants.MAIN_GROUP_NAME);
@@ -88,7 +88,7 @@ public class TestContextUpdateModel {
         ParameterService.register(contextParameters.getDistributorParameters());
         ParameterService.register(contextParameters.getLockManagerParameters());
         ParameterService.register(contextParameters.getPersistorParameters());
-        
+
         engineParameters = new EngineParameters();
         engineParameters.getExecutorParameterMap().put("MVEL", new MvelExecutorParameters());
         ParameterService.register(engineParameters);
@@ -100,7 +100,7 @@ public class TestContextUpdateModel {
     @After
     public void afterTest() {
         ParameterService.deregister(engineParameters);
-        
+
         ParameterService.deregister(contextParameters.getDistributorParameters());
         ParameterService.deregister(contextParameters.getLockManagerParameters());
         ParameterService.deregister(contextParameters.getPersistorParameters());
@@ -170,7 +170,9 @@ public class TestContextUpdateModel {
      * Test context update model after.
      */
     @After
-    public void testContextUpdateModelAfter() {}
+    public void testContextUpdateModelAfter() {
+        // Not used
+    }
 
     /**
      * Send event.
@@ -182,7 +184,7 @@ public class TestContextUpdateModel {
      * @throws ContextException the context exception
      */
     private void sendEvent(final ApexEngine apexEngine, final TestApexActionListener listener, final String eventName,
-            final boolean shouldWork) throws ContextException {
+        final boolean shouldWork) throws ContextException {
         final Date aDate = new Date(1433453067123L);
         final Map<String, Object> eventDataMap = new HashMap<String, Object>();
         eventDataMap.put("TestSlogan", "This is a test slogan");
index a44f844..b547cc4 100644 (file)
@@ -90,49 +90,65 @@ public class TestContext implements Context {
      * {@inheritDoc}.
      */
     @Override
-    public void bind(final Name name, final Object obj) throws NamingException {}
+    public void bind(final Name name, final Object obj) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void bind(final String name, final Object obj) throws NamingException {}
+    public void bind(final String name, final Object obj) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void rebind(final Name name, final Object obj) throws NamingException {}
+    public void rebind(final Name name, final Object obj) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void rebind(final String name, final Object obj) throws NamingException {}
+    public void rebind(final String name, final Object obj) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void unbind(final Name name) throws NamingException {}
+    public void unbind(final Name name) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void unbind(final String name) throws NamingException {}
+    public void unbind(final String name) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void rename(final Name oldName, final Name newName) throws NamingException {}
+    public void rename(final Name oldName, final Name newName) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void rename(final String oldName, final String newName) throws NamingException {}
+    public void rename(final String oldName, final String newName) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
@@ -170,13 +186,17 @@ public class TestContext implements Context {
      * {@inheritDoc}.
      */
     @Override
-    public void destroySubcontext(final Name name) throws NamingException {}
+    public void destroySubcontext(final Name name) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
      */
     @Override
-    public void destroySubcontext(final String name) throws NamingException {}
+    public void destroySubcontext(final String name) throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
@@ -270,7 +290,9 @@ public class TestContext implements Context {
      * {@inheritDoc}.
      */
     @Override
-    public void close() throws NamingException {}
+    public void close() throws NamingException {
+        // Not used here
+    }
 
     /**
      * {@inheritDoc}.
index ddd70a3..c54c790 100644 (file)
@@ -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=========================================================
  */
@@ -40,7 +40,9 @@ public class TestInitialContextFactory implements InitialContextFactory {
      *
      * @throws NamingException the naming exception
      */
-    public TestInitialContextFactory() throws NamingException {}
+    public TestInitialContextFactory() throws NamingException {
+        // Default constructor
+    }
 
     /**
      * {@inheritDoc}.
index 0c2ac32..670f499 100644 (file)
@@ -125,7 +125,6 @@ public class DummyApexEventProducer implements ApexEventProducer {
             throw new ApexEventRuntimeException(message);
         }
 
-
         try {
             executionProperties.store(new FileOutputStream(new File(dummyProducerProperties.getPropertyFileName())),
                     "");
@@ -141,5 +140,7 @@ public class DummyApexEventProducer implements ApexEventProducer {
      * {@inheritDoc}.
      */
     @Override
-    public void stop() {}
+    public void stop() {
+        // Not used
+    }
 }
index 52f0e74..71fea36 100644 (file)
@@ -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=========================================================
 -->
@@ -25,7 +25,7 @@
     <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
     <property name="LOG_DIR" value="${java.io.tmpdir}/apex_logging/" />
 
-       <!-- USE FOR STD OUT ONLY -->
+    <!-- USE FOR STD OUT ONLY -->
     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
         <encoder>
             <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
index 14f84bb..0a119cd 100644 (file)
@@ -47,7 +47,9 @@ public final class SchemaUtils {
     /**
      * Private constructor to avoid instantiation.
      */
-    private SchemaUtils() {}
+    private SchemaUtils() {
+        // Private constructor to block subclassing
+    }
 
     /**
      * Returns the schema for an event.
index 122ec90..3590a76 100644 (file)
@@ -84,9 +84,9 @@ public final class CliOptions {
             .desc("set the input policy model file").build();
 
     /** A type option defining what type is used for events with "-t" and "--type". */
-    public static final Option TYPE = Option.builder("t").hasArg().argName("TYPE").longOpt("type").desc(
-            "set the event type for generation, one of: stimuli (trigger events), response (action events),"
-            + " internal (events between states)")
+    public static final Option TYPE = Option.builder("t").hasArg().argName("TYPE").longOpt("type")
+            .desc("set the event type for generation, one of: stimuli (trigger events), response (action events),"
+                    + " internal (events between states)")
             .build();
 
     /** A server option with "-s" and "--server". */
@@ -100,7 +100,9 @@ public final class CliOptions {
     /** A skip validation option with "-sv" and "--skip-validation". */
     public static final Option SKIPVALIDATION = Option.builder("sv").longOpt("skip-validation")
             .desc("switch of validation of the input file").required(false).type(boolean.class).build();
-    
+
     /** Private constructor to prevent instantiation. */
-    private CliOptions() {}
+    private CliOptions() {
+        // Private constructor to block subclassing
+    }
 }