Nitin thinks this is more readable. Not sure I agree, but I don't care enough to argue.

2.3.0
Brett Wooldridge 10 years ago
parent 77d6f5084a
commit 3d80609d6a

@ -181,11 +181,13 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
if (iface.isInstance(this)) {
return (T) this;
}
else if (pool != null) {
if (pool != null) {
if (iface.isInstance(pool.getDataSource())) {
return (T) pool.getDataSource();
}
else if (pool.getDataSource() instanceof Wrapper) {
if (pool.getDataSource() instanceof Wrapper) {
return (T) pool.getDataSource().unwrap(iface);
}
}

Loading…
Cancel
Save