Implement unwrap()

pull/60/head
Brett Wooldridge 11 years ago
parent 4a410d8593
commit 5e1b7be484

@ -146,10 +146,15 @@ public class HikariDataSource extends HikariConfig implements DataSource
/** {@inheritDoc} */
@Override
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException
{
// TODO Auto-generated method stub
return null;
if (pool != null && iface.isInstance(pool.dataSource))
{
return (T) pool.dataSource;
}
throw new SQLException("Wrapped connection is not an instance of " + iface);
}
/** {@inheritDoc} */

Loading…
Cancel
Save