You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (Jira)" <ji...@apache.org> on 2019/09/21 15:23:00 UTC

[jira] [Commented] (POOL-376) invalidateObject should not return NullPointerException

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

Phil Steitz commented on POOL-376:
----------------------------------

This is a regression caused by the fix for Pool-356.  

> invalidateObject should not return NullPointerException
> -------------------------------------------------------
>
>                 Key: POOL-376
>                 URL: https://issues.apache.org/jira/browse/POOL-376
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.6.2
>            Reporter: M Sazzadul Hoque
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{GenericObjectPool.invalidateObject(T obj)}} should not return {{NullPointerException}} when obj is not null.
> Please see following stack trace:
> {code:java}
> Caused by: java.lang.NullPointerException
>         at org.apache.commons.pool2.impl.LinkedBlockingDeque.putLast(LinkedBlockingDeque.java:454)
>         at org.apache.commons.pool2.impl.LinkedBlockingDeque.put(LinkedBlockingDeque.java:788)
>         at org.apache.commons.pool2.impl.GenericObjectPool.destroy(GenericObjectPool.java:939)
>         at org.apache.commons.pool2.impl.GenericObjectPool.invalidateObject(GenericObjectPool.java:618)
> {code}
> Apparent reason: In {{destroy(PooledObject<T> toDestroy)}}, create() may return null even though {{toDestroy}} is already destroyed.
> Please make the fix available for JDK 1.7.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)