[
https://issues.apache.org/jira/browse/POOL-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16689980#comment-16689980
]
ASF GitHub Bot commented on POOL-359:
-------------------------------------
GitHub user mswintermeyer opened a pull request:
https://github.com/apache/commons-pool/pull/17
POOL-359: prevent NPE closing multiple GenericObjectPool's
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mswintermeyer/commons-pool fixNPEClosePools
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-pool/pull/17.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17
----
commit 0fdde72475b378cbd0fb707d52385196d928a1da
Author: Michael Wintermeyer <michaelw@...>
Date: 2018-11-16T20:23:51Z
POOL-359: prevent NPE closing multiple GenericObjectPool's
----
> NullPointerException closing multiple GenericObjectPool's
> ---------------------------------------------------------
>
> Key: POOL-359
> URL: https://issues.apache.org/jira/browse/POOL-359
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 2.6.0
> Reporter: Michael Wintermeyer
> Priority: Major
>
> {code:java}
> java.lang.NullPointerException
> at org.apache.commons.pool2.impl.EvictionTimer.cancel(EvictionTimer.java:97)
> at
> org.apache.commons.pool2.impl.BaseGenericObjectPool.startEvictor(BaseGenericObjectPool.java:753)
> at
> org.apache.commons.pool2.impl.GenericObjectPool.close(GenericObjectPool.java:694)
> {code}
> Possible when multiple pools in the same process each call #close.
> GenericObjectPool#close checks #isClosed before proceeding, but that call
> checks a non-static instance variable. It calls into EvictionTimer#cancel
> which sets the _static_ variable EvictionCache.executor to null.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)