X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fcore%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Ftest%2Futil%2FJU_Pool.java;h=ef4bc687cc10ec16d4bdc654aa454990a4b15e60;hb=17ca744723bd652f15d59d6c8555824f6e49018d;hp=f4703bb86e5abd4a0440c6caf6ab512dea67d7c0;hpb=21904502c37e277b2bc3f61b4033e9b9a4cbf8dd;p=aaf%2Fauthz.git diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java index f4703bb8..ef4bc687 100644 --- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java +++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/util/JU_Pool.java @@ -37,15 +37,30 @@ public class JU_Pool { private class IntegerCreator implements Creator { private int current = 0; - @Override public Integer create() { return current++; } - @Override public void destroy(Integer t) { t = 0; } - @Override public boolean isValid(Integer t) { return (t & 0x1) == 0; } - @Override public void reuse(Integer t) { } + + @Override + public Integer create() { + return current++; + } + + @Override + public void destroy(Integer t) { + t = 0; + } + + @Override + public boolean isValid(Integer t) { + return (t & 0x1) == 0; + } + + @Override + public void reuse(Integer t) { + } } private class CustomLogger implements Log { @Override - public void log(Object ... o) { + public void log(Object... o) { for (Object item : o) { sb.append(item.toString()); } @@ -110,7 +125,8 @@ public class JU_Pool { Pooled gotten = intPool.get(); assertThat(gotten.content, is(0)); - // finalize that item, then check the next one to make sure we actually purged the odd numbers + // finalize that item, then check the next one to make sure we actually purged + // the odd numbers gotten = intPool.get(); assertThat(gotten.content, is(2)); @@ -118,7 +134,6 @@ public class JU_Pool { } - @Test public void setMaxTest() { Pool intPool = new Pool(new IntegerCreator());