aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-12-04 09:20:04 +0000
committerliamfallon <liam.fallon@est.tech>2019-12-04 17:14:11 +0000
commit7a0a44eac6167cfeff935c39f2c3f20d3a893c3e (patch)
tree5874e4b8f0e4b5ce8cc222912833029729fe4ed3 /core
parent9253f81d14a5217479ca8e59efb198eaa32ec9f0 (diff)
Minor changes for new Eclipse checkstyle checks
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. Issue-ID: POLICY-1913 Change-Id: I30ba25e3e425c6d54c77f925e8da3ab841a8357c Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'core')
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java4
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java4
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java8
-rw-r--r--core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java4
-rw-r--r--core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java24
-rw-r--r--core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java4
6 files changed, 30 insertions, 18 deletions
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
index 698a1d837..b13db033a 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
@@ -244,5 +244,7 @@ public abstract class StateFinalizerExecutor
* {@inheritDoc}.
*/
@Override
- public void setParameters(final ExecutorParameters parameters) {}
+ public void setParameters(final ExecutorParameters parameters) {
+ // Not used
+ }
}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
index ab81a8490..50abeea6d 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
@@ -314,5 +314,7 @@ public abstract class TaskExecutor
* {@inheritDoc}.
*/
@Override
- public void setParameters(final ExecutorParameters parameters) {}
+ public void setParameters(final ExecutorParameters parameters) {
+ // Not used
+ }
}
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
index d99d6b005..3f360ea9c 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
@@ -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
+ }
}
diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java
index 16a3369fb..6da92d55e 100644
--- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java
+++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/java/classes/ClassUtils.java
@@ -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
diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java
index a6c3c5854..1c5f2a3a6 100644
--- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java
+++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/util/MessagingUtils.java
@@ -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
diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java
index b5663e452..eb4e0210b 100644
--- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java
+++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/threading/ThreadUtilities.java
@@ -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.