[
https://issues.apache.org/jira/browse/DBCP-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory resolved DBCP-573.
----------------------------------
Fix Version/s: 2.9.0
Resolution: Fixed
[~ralaoui]
Please see git master and close if your use cases are covered.
Merci!
> DataSource implementations do not implement Wrapper interface correctly
> -----------------------------------------------------------------------
>
> Key: DBCP-573
> URL: https://issues.apache.org/jira/browse/DBCP-573
> Project: Commons DBCP
> Issue Type: Bug
> Affects Versions: 2.8.0
> Reporter: Réda Housni Alaoui
> Priority: Major
> Fix For: 2.9.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Let's take {{BasicDataSource}} as an example. Its code is currently:
> {code:java}
> @Override
> public boolean isWrapperFor(final Class<?> iface) throws SQLException {
> return false;
> }
> @Override
> public <T> T unwrap(final Class<T> iface) throws SQLException {
> throw new SQLException("BasicDataSource is not a wrapper.");
> }{code}
> This breaks consumers relying on Wrapper being correctly implemented.
> The DataSource should at least check if *this* is an instance of iface and
> return it from {{unwrap}} if it is.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)