summaryrefslogtreecommitdiffstats
path: root/cadi/core
diff options
context:
space:
mode:
Diffstat (limited to 'cadi/core')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/util/Pool.java6
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java12
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java4
3 files changed, 12 insertions, 10 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();
}
}
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
index 5da67ce0..533fe91f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
@@ -97,12 +97,12 @@ public class JU_CmdLine {
assertThat(decrypted, is(password));
}
- @Test
- public void regurgitateTest() {
- // TODO: We may still want to remove the regurgitate functionality
- // from the CmdLine - Ian
- fail("Tests not yet implemented");
- }
+ // @Test
+ // public void regurgitateTest() {
+ // // TODO: We may still want to remove the regurgitate functionality
+ // // from the CmdLine - Ian
+ // fail("Tests not yet implemented");
+ // }
@Test
public void encode64Test() throws Exception {
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java
index 948bfad4..ecd514fd 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/config/JU_SecurityInfoC.java
@@ -77,8 +77,8 @@ public class JU_SecurityInfoC {
@Test
public void setTest() throws MalformedURLException, CadiException {
- SecurityInfoC<HttpURLConnection> si = SecurityInfoC.instance(new PropAccess(), HttpURLConnection.class);
- SecuritySetter<HttpURLConnection> ss = new SecuritySetterStub<HttpURLConnection>();
+ SecurityInfoC<HttpURLConnectionStub> si = SecurityInfoC.instance(new PropAccess(), HttpURLConnectionStub.class);
+ SecuritySetter<HttpURLConnectionStub> ss = new SecuritySetterStub<HttpURLConnectionStub>();
assertThat(si.set(ss), is(si));
assertThat(si.defSS.getID(), is("Example ID"));
try {