summaryrefslogtreecommitdiffstats
path: root/cadi/core/src/main
diff options
context:
space:
mode:
authorIanHowell <ian.howell@att.com>2018-04-03 15:26:47 -0500
committerIanHowell <ian.howell@att.com>2018-04-03 15:47:26 -0500
commite612377163e148280503ca8db93223ab1fdee4dc (patch)
tree1cbf9cfe9b7a739875f456eb33204a964b1ae14a /cadi/core/src/main
parent61f8fdfa4be59b1c6172bec7ab54369c20b59f2e (diff)
Fix the remaining failing tests in Cadi
Change-Id: Icac61b413bdc2de9ee73c14a785d26a3fe443fe4 Signed-off-by: IanHowell <ian.howell@att.com> Modify deprecated sonar properties in AAF Modified Misc pom files. Issue-ID: AAF-208 Change-Id: Iaf4e12c81f98fdca18992ffb24b78cd0135996df Signed-off-by: Sai Gandham <sg481n@att.com> Include Cadi and Misc JUnits for testing phase Issue-ID: AAF-128 Change-Id: Iee531d58c3aad1c5504e2e2619f611f30063e601 Signed-off-by: IanHowell <ian.howell@att.com> Fix a concurrency bug when removing invalid items from a Pool Change-Id: I5f3e18ff4e3eaedc2b4f3a4be1891c5187ab261b Signed-off-by: IanHowell <ian.howell@att.com>
Diffstat (limited to 'cadi/core/src/main')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java b/cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java
index d61aee21..4312c3ca 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java
@@ -27,6 +27,7 @@
*/
package org.onap.aaf.cadi.util;
+import java.util.Iterator;
import java.util.LinkedList;
import org.onap.aaf.cadi.CadiException;
@@ -210,11 +211,12 @@ public class Pool<T> {
public boolean validate() {
boolean rv = true;
synchronized (list) {
- for (Pooled<T> t : list) {
+ for (Iterator<Pooled<T>> iter = list.iterator(); iter.hasNext();) {
+ Pooled<T> t = iter.next();
if (!creator.isValid(t.content)) {
rv = false;
t.toss();
- list.remove(t);
+ iter.remove();
}
}
}