aboutsummaryrefslogtreecommitdiffstats
path: root/models/src
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2022-06-24 14:47:25 +0100
committerRamesh Murugan Iyer <ramesh.murugan.iyer@est.tech>2022-06-24 14:10:29 +0000
commit0eca9210ebdfc62b3ca8290b2b9fe67add61111b (patch)
tree6636ae5a2f7f167944a833c257d250a4854576c7 /models/src
parent23633d10886f46c67c0deadd175f72ada2453237 (diff)
Fix participant update list event for multiple AC elements
If multiple AC elements are mapped to a single participant, the update list event from runtime includes only a single element by overriding the previous entries from the update list. Removed the immutable list that causes the issue. Issue-ID: POLICY-4241 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I59dcd3706394ab937d4e517bc69285c50d9ac260
Diffstat (limited to 'models/src')
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java b/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java
index 394579aa6..f54ecb441 100644
--- a/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/utils/AcmUtils.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2022 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ public class AcmUtils {
var participantExists = false;
for (ParticipantUpdates participantUpdate : participantUpdates) {
if (participantUpdate.getParticipantId().equals(acElement.getParticipantId())) {
- participantUpdate.setAutomationCompositionElementList(List.of(acElement));
+ participantUpdate.getAutomationCompositionElementList().add(acElement);
participantExists = true;
}
}
@@ -71,7 +71,7 @@ public class AcmUtils {
private static ParticipantUpdates getAutomationCompositionElementList(AutomationCompositionElement acElement) {
var participantUpdate = new ParticipantUpdates();
participantUpdate.setParticipantId(acElement.getParticipantId());
- participantUpdate.setAutomationCompositionElementList(List.of(acElement));
+ participantUpdate.getAutomationCompositionElementList().add(acElement);
return participantUpdate;
}