Add org.apache.commons.pool2.PooledObject#getBorrowedCount().
Use new API directly.
@@ -93,11 +93,7 @@ public class DefaultPooledObjectInfo implements DefaultPooledObjectInfoMBean {
@Override
public long getBorrowedCount() {
- // TODO Simplify this once getBorrowedCount has been added to PooledObject
- if (pooledObject instanceof DefaultPooledObject) {
- return ((DefaultPooledObject<?>) pooledObject).getBorrowedCount();
- }
- return -1;
+ return pooledObject.getBorrowedCount();
}
/**
