diff --git a/src/test/java/org/apache/commons/pool3/impl/TestSoftReferenceObjectPool.java b/src/test/java/org/apache/commons/pool3/impl/TestSoftReferenceObjectPool.java index 3f5f4c232..8036a8682 100644 --- a/src/test/java/org/apache/commons/pool3/impl/TestSoftReferenceObjectPool.java +++ b/src/test/java/org/apache/commons/pool3/impl/TestSoftReferenceObjectPool.java @@ -26,17 +26,17 @@ */ public class TestSoftReferenceObjectPool extends TestBaseObjectPool { - private static final class SimpleFactory extends BasePooledObjectFactory { + private static final class SimpleFactory extends BasePooledObjectFactory { int counter; @Override - public T create() { - return (T)String.valueOf(counter++); + public String create() { + return String.valueOf(counter++); } @Override - public PooledObject wrap(final T value) { + public PooledObject wrap(final String value) { return new DefaultPooledObject<>(value); } } @@ -59,8 +59,8 @@ protected boolean isLifo() { @Override protected ObjectPool makeEmptyPool(final int cap) { - final PooledObjectFactory factory = new SimpleFactory<>(); - return makeEmptyPool(factory); + final PooledObjectFactory factory = new SimpleFactory(); + return (ObjectPool)makeEmptyPool(factory); } @Override