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] [Comment Edited] (POOL-338) GenericObjectPool constructor throws an exception
Date Wed, 11 Apr 2018 15:54:00 GMT

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

Gary Gregory edited comment on POOL-338 at 4/11/18 3:53 PM:
------------------------------------------------------------

Ah, yes, the ctor... please try the attached patch [^commons-pool-gg.patch]

In the 2.x version, we have to keep backward compatibility in mind. This patch will use the
class name only if the class name is different from the default class name.

Gary


was (Author: garydgregory):
Ah, yes, the ctor... please try the attached patch [^commons-pool-gg.patch]

^In the 2.x version, we have to keep backward compatibility in mind. This patch will use the
class name only if the class name is different from the default class name.^

Gary

> GenericObjectPool constructor throws an exception
> -------------------------------------------------
>
>                 Key: POOL-338
>                 URL: https://issues.apache.org/jira/browse/POOL-338
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 2.4.2, 2.4.3, 2.5.0
>         Environment: Java 8, Liferay DXP (an OSGi environment).
>            Reporter: Michael C
>            Priority: Major
>         Attachments: commons-pool-gg.patch
>
>
> Version 2.4.3 GenericObjectPool constructor throws this exception:
> {{java.lang.IllegalArgumentException: [org.apache.commons.pool2.impl.DefaultEvictionPolicy]
does not implement EvictionPolicy}}
> {{    at org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:618)}}
> {{    at org.apache.commons.pool2.impl.GenericObjectPool.setConfig(GenericObjectPool.java:318)}}
> {{    at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:115)}}
> {{    at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:88)}}
>  
> Version 2.5.0 throws the same exception. Version 2.4.2 or older's setEvictionPolicyClassName
method fail silently for the same reason. This line in BaseGenericObjectPool evaluates to
false for all versions:
> {{        if (policy instanceof EvictionPolicy<?>) {}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message