From d008dbeb7fc260ec3ad7330dfaf24e46a39eed0c Mon Sep 17 00:00:00 2001 From: Pier Luigi Date: Mon, 15 Jan 2018 09:48:49 +0100 Subject: [PATCH] [CORD-2533] UnsupportedOperationException in OFDPA pipeliner Rationale: appkryo returns immutable lists serializable which do not support removeIf and addAll methods Change-Id: I25f7f818677d78cad65122f476702f9e194fd620 --- .../onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java index bec569e716..38cc72bf8d 100644 --- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java +++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/ofdpa/Ofdpa2GroupHandler.java @@ -1440,6 +1440,7 @@ public class Ofdpa2GroupHandler { // get a fresh copy of what the store holds NextGroup next = flowObjectiveStore.getNextGroup(nextObjective.id()); List> allActiveKeys = appKryo.deserialize(next.data()); + allActiveKeys = Lists.newArrayList(allActiveKeys); // Note that since we got a new object, and ArrayDeque does not implement // Object.equals(), we have to check the deque elems one by one allActiveKeys @@ -1814,6 +1815,7 @@ public class Ofdpa2GroupHandler { } if (nextGrp.nextObjective().op() == Operation.ADD_TO_EXISTING) { List> allActiveKeys = appKryo.deserialize(next.data()); + allActiveKeys = Lists.newArrayList(allActiveKeys); // If active keys shows only the top-level group without a chain of groups, // then it represents an empty group. Update by replacing empty chain. if (allActiveKeys.size() == 1 && allActiveKeys.get(0).size() == 1) {