commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (POOL-324) org.apache.commons.pool2.impl.GenericObjectPool.getFactoryType() throws java.lang.ClassCastException
Date Mon, 27 Mar 2017 16:36:42 GMT

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

Gary Gregory commented on POOL-324:
-----------------------------------

I added these tests:

- org.apache.commons.pool2.impl.TestGenericObjectPool.testGetFactoryType()
- (IGNORED) org.apache.commons.pool2.impl.TestGenericObjectPool.testGetFactoryType_PoolUtilssynchronizedPooledFactory()
- (IGNORED) org.apache.commons.pool2.impl.TestGenericObjectPool.testGetFactoryType_SynchronizedPooledObjectFactory()

> org.apache.commons.pool2.impl.GenericObjectPool.getFactoryType() throws java.lang.ClassCastException
> ----------------------------------------------------------------------------------------------------
>
>                 Key: POOL-324
>                 URL: https://issues.apache.org/jira/browse/POOL-324
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.4.2
>            Reporter: Jay Xu
>
> org.apache.commons.pool2.impl.GenericObjectPool.getFactoryType() throws java.lang.ClassCastException
when wrapping a org.apache.commons.pool2.PoolUtils.SynchronizedPooledObjectFactory.
> Testing code:
> {code:java}
>     public static void main(String[] args) {
>         GenericObjectPool<String> p = new GenericObjectPool<>(PoolUtils
>             .synchronizedPooledFactory(new BasePooledObjectFactory<String>() {
>                 @Override
>                 public String create() {
>                     // fake
>                     return null;
>                 }
>                 @Override
>                 public PooledObject<String> wrap(String obj) {
>                     // fake
>                     return null;
>                 }
>             }));
>         System.out.println(p.getFactoryType()); // ex thrown
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message