summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-07-24 14:23:37 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-07-24 14:24:12 +0100
commit79ae3f7f229db52b8ab18c405c5109f8d18db1b6 (patch)
tree28b428ca68bfb677ac02faeffb3b6c69a252f66a
parent41ecf036b7f1b3bdd56311a0bc706407b242faca (diff)
Fix bug in APEX parameter service
The parameter calss name was not initialized in the constructor of the parameter service The web socket connections() method is depricated and replaced by getConnections() Fixed order of build in main pom to put packages module last fixed some comments that were incorrect Change-Id: I6340655100655e181e2d97fe39def4874873dff5 Issue-ID: POLICY-954 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
-rw-r--r--core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java6
-rw-r--r--model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java4
-rw-r--r--pom.xml2
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java4
4 files changed, 8 insertions, 8 deletions
diff --git a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java
index ee6e1a329..389d04dcc 100644
--- a/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java
+++ b/core/core-infrastructure/src/main/java/org/onap/policy/apex/core/infrastructure/messaging/impl/ws/server/MessageServerImpl.java
@@ -91,7 +91,7 @@ public class MessageServerImpl<MESSAGE> extends InternalMessageBusServer<MESSAGE
// Stop the web socket server
try {
// Close all connections on this web socket server
- for (final WebSocket connection : connections()) {
+ for (final WebSocket connection : getConnections()) {
connection.closeConnection(0, "");
}
stop();
@@ -128,7 +128,7 @@ public class MessageServerImpl<MESSAGE> extends InternalMessageBusServer<MESSAGE
@Override
public void send(final MessageHolder<MESSAGE> message) {
// Send the incoming message to all clients connected to this web socket
- final Collection<WebSocket> connections = connections();
+ final Collection<WebSocket> connections = getConnections();
for (final WebSocket webSocket : connections) {
webSocket.send(MessagingUtils.serializeObject(message));
}
@@ -142,7 +142,7 @@ public class MessageServerImpl<MESSAGE> extends InternalMessageBusServer<MESSAGE
*/
@Override
public void send(final String messageString) {
- final Collection<WebSocket> connections = connections();
+ final Collection<WebSocket> connections = getConnections();
for (final WebSocket webSocket : connections) {
webSocket.send(messageString);
}
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
index c7ec2d662..cc7c7b06f 100644
--- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/AbstractParameters.java
@@ -32,7 +32,7 @@ import org.onap.policy.apex.model.utilities.Assertions;
*/
public abstract class AbstractParameters {
// The name of the parameter subclass
- private String parameterClassName = this.getClass().getCanonicalName();
+ private final String parameterClassName;
/**
* Constructor, creates a parameter class that must be a subclass of {@link AbstractParameters}.
@@ -47,6 +47,8 @@ public abstract class AbstractParameters {
throw new ApexRuntimeException(
"class \"" + parameterClassName + "\" not found or not an instance of \"" + this.getClass().getCanonicalName() + "\"", e);
}
+
+ this.parameterClassName = parameterClassName;
}
/**
diff --git a/pom.xml b/pom.xml
index f8d8a5587..8d0f6539a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,8 +161,8 @@
<module>plugins</module>
<module>examples</module>
<module>testsuites</module>
- <module>packages</module>
<module>client</module>
<module>tools</module>
+ <module>packages</module>
</modules>
</project>
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
index 1b5603482..436225fc4 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java
@@ -45,7 +45,7 @@ public class ApexMain {
private ApexParameters parameters;
/**
- * Instantiates the Apex Apex service.
+ * Instantiates the Apex service.
*
* @param args the commaind line arguments
*/
@@ -138,8 +138,6 @@ public class ApexMain {
/**
* The Class ApexMainShutdownHookClass terminates the Apex engine for the Apex service when its
* run method is called.
- *
- * @author Liam Fallon (liam.fallon@ericsson.com)
*/
private class ApexMainShutdownHookClass extends Thread {
/*