[jira] [Commented] (POOL-359) NullPointerException closing multiple GenericObjectPool's

2018-11-19 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on POOL-359:
-

Github user graben commented on the issue:

https://github.com/apache/commons-pool/pull/17
  
#18 fixes actual failing travis build!


> 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)


[jira] [Commented] (POOL-359) NullPointerException closing multiple GenericObjectPool's

2018-11-18 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on POOL-359:
-

Github user grimreaper commented on the issue:

https://github.com/apache/commons-pool/pull/17
  
Works for me. Blocked on INFRA-17267
travis fails for unrelated reasons, but tests pass locally:
```
[INFO] 

[INFO] BUILD SUCCESS
[INFO] 

[INFO] Total time:  05:45 min
[INFO] Finished at: 2018-11-18T20:54:44-08:00
[INFO] 

```


> 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)


[jira] [Commented] (POOL-359) NullPointerException closing multiple GenericObjectPool's

2018-11-18 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on POOL-359:
-

Github user mswintermeyer commented on the issue:

https://github.com/apache/commons-pool/pull/17
  
If `cancel` should not be called more than once, then I believe that would 
require a greater re-architecture. `GenericObjectPool`'s would need to keep 
track of whether another object pool called `cancel`: to rely on something 
other than non-static state (`closed` variable on `BaseGenericObjectPool`) to 
call a static method. To me, it seems cleanest for static methods to be 
designed defensively. So I'm not aware of a reason to not allow this, but I 
acknowledge I'm new to the codebase.

Side note that the risk of an NPE in `cancel` seems somewhat new. [This 
commit](https://github.com/apache/commons-pool/commit/867614829ba6b041ca6becbad0f43cb180003404#diff-38e254894b87bdf9a1758778c7ffd50fL96)
 refactored `EvictionTimer` to depend on the executor's queue rather than an 
integer `usageCount`.


> 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)


[jira] [Commented] (POOL-359) NullPointerException closing multiple GenericObjectPool's

2018-11-16 Thread Michael Wintermeyer (JIRA)


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

Michael Wintermeyer commented on POOL-359:
--

I've opened a PR here: [https://github.com/apache/commons-pool/pull/17.] Thanks 
in advance for reviewing, and thank you for all your work maintaining this 
project!

> 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)


[jira] [Commented] (POOL-359) NullPointerException closing multiple GenericObjectPool's

2018-11-16 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/POOL-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 
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)