From 660e20098d446046a27b03b44bccd069aae5408b Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Thu, 23 Feb 2023 17:03:24 +0000 Subject: Fix ClassCastException in ACM Fix ClassCastException in ACM when acm-runtime starts after participants. Issue-ID: POLICY-4575 Change-Id: Icef82d3ba7f3847c821362ed063c1cf8e81604c5 Signed-off-by: FrancescoFioraEst --- .../clamp/acm/participant/intermediary/handler/ParticipantHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'participant') diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java index ff967791d..5565e0bd0 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java @@ -93,7 +93,6 @@ public class ParticipantHandler { @Timed(value = "listener.participant_status_req", description = "PARTICIPANT_STATUS_REQ messages received") public void handleParticipantStatusReq(final ParticipantStatusReq participantStatusReqMsg) { var participantStatus = makeHeartbeat(true); - participantStatus.setParticipantSupportedElementType(this.supportedAcElementTypes); publisher.sendParticipantStatus(participantStatus); } @@ -268,6 +267,7 @@ public class ParticipantHandler { heartbeat.setParticipantId(participantId); heartbeat.setState(ParticipantState.ON_LINE); heartbeat.setAutomationCompositionInfoList(getAutomationCompositionInfoList()); + heartbeat.setParticipantSupportedElementType(new ArrayList<>(this.supportedAcElementTypes)); if (responseToParticipantStatusReq) { List participantDefinitionList = new ArrayList<>(acElementDefsMap.size()); -- cgit 1.2.3-korg