Rodrigo Merino created POOL-427:
-----------------------------------
Summary: Pool not honoring maxIdle < 0 when calling addObject
after POOL-425
Key: POOL-427
URL: https://issues.apache.org/jira/browse/POOL-427
Project: Commons Pool
Issue Type: Bug
Affects Versions: 2.13.0
Reporter: Rodrigo Merino
When maxIdle is negative and addObject is called, no object is created.
According to the doc, a negative value means there is no limit in the idle
objects (ref:
[https://github.com/apache/commons-pool/blob/ab03c747a6cfa18596049a2df063c7b2b5edd903/src/main/java/org/apache/commons/pool3/impl/GenericObjectPool.java#L832).]
The check is not accounting for negative values in maxIdle:
https://github.com/apache/commons-pool/blame/POOL_2_X/src/main/java/org/apache/commons/pool2/impl/GenericObjectPool.java#L218
--
This message was sent by Atlassian Jira
(v8.20.10#820010)