You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/11/22 16:47:00 UTC

[jira] [Resolved] (POOL-359) NullPointerException closing multiple GenericObjectPools

     [ https://issues.apache.org/jira/browse/POOL-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory resolved POOL-359.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 2.6.1

I am marking this issue as resolved since code inspection makes it obvious that the NPE is avoided. The tests still pass for me without the main code change. I think we are good to go to push 2.6.1 RC3.

> NullPointerException closing multiple GenericObjectPools
> --------------------------------------------------------
>
>                 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
>             Fix For: 2.6.1
>
>
> {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)