summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mokry <michael.mokry@att.com>2019-05-01 10:40:03 -0500
committerMichael Mokry <michael.mokry@att.com>2019-05-01 15:00:57 -0500
commitb5fc59108c78eaf411fd65511a8ad7cf7770f200 (patch)
tree3c4e31c10c1c0af4a1f1d89582ee4de9e7417a9a
parent5ef7eae318606da6aacc455fed3d320e1e899a05 (diff)
Changes to support previous review comments
Added new generated request id when sending terminate message changed to send clone of PdpStatus Change-Id: Ia60469c8a62d3c2eff63fd592984cade4760b2bc Issue-ID: POLICY-1645 Signed-off-by: Michael Mokry <michael.mokry@att.com>
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java2
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java7
2 files changed, 3 insertions, 6 deletions
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java b/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java
index f672ccdd..b7aa231f 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java
@@ -131,7 +131,7 @@ public class XacmlState {
*/
public PdpStatus terminatePdpMessage() {
status.setState(PdpState.TERMINATED);
- return status;
+ return new PdpStatus(status);
}
/**
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
index e7633674..5f014a12 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
@@ -22,7 +22,6 @@ package org.onap.policy.pdpx.main.startstop;
import java.nio.file.Paths;
import java.util.Arrays;
-import java.util.Collections;
import java.util.Properties;
import lombok.Getter;
import lombok.Setter;
@@ -32,11 +31,9 @@ import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClientException;
import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher;
import org.onap.policy.common.parameters.ParameterService;
-import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.common.utils.services.ServiceManagerContainer;
import org.onap.policy.models.pdp.concepts.PdpStatus;
import org.onap.policy.models.pdp.enums.PdpMessageType;
-import org.onap.policy.models.pdp.enums.PdpState;
import org.onap.policy.pdpx.main.PolicyXacmlPdpRuntimeException;
import org.onap.policy.pdpx.main.XacmlState;
import org.onap.policy.pdpx.main.comm.XacmlPdpHearbeatPublisher;
@@ -91,8 +88,8 @@ public class XacmlPdpActivator extends ServiceManagerContainer {
TopicEndpoint.manager.addTopicSinks(topicProperties);
TopicEndpoint.manager.addTopicSources(topicProperties);
- XacmlPdpHearbeatPublisher heartbeat;
- TopicSinkClient sinkClient;
+ final XacmlPdpHearbeatPublisher heartbeat;
+ final TopicSinkClient sinkClient;
final XacmlState state;
try {