From 67d13b7e11677e3f2678e137471923222ec9b329 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 26 Mar 2020 11:51:52 -0400 Subject: Discard requests in APPC legacy actor The new actor for legacy APPC attempts to discard request messages received on the response topic by discarding those that have a null response. Unfortunately, when it decodes them, the Response object creates a status object, even if there isn't one in the json message, thus the test fails and the actor treats it as a failed response. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn Change-Id: I26cfb25443ff2ed394781d309f9097d50b8f160b Signed-off-by: Jim Hahn --- .../appc/src/main/java/org/onap/policy/appc/Response.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'models-interactions/model-impl') diff --git a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java index ae8b76423..fb70151f6 100644 --- a/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java +++ b/models-interactions/model-impl/appc/src/main/java/org/onap/policy/appc/Response.java @@ -38,8 +38,13 @@ public class Response implements Serializable { @SerializedName("CommonHeader") private CommonHeader commonHeader; + /** + * This should only be populated if the incoming message actually has a "Status" + * field. Otherwise, actor.appc will be unable to use this to distinguish between + * Request and Response objects. + */ @SerializedName("Status") - private ResponseStatus status = new ResponseStatus(); + private ResponseStatus status; @SerializedName("Payload") private Map payload = new HashMap<>(); -- cgit 1.2.3-korg