Remove redundant shutdown check (handled properly by the pool), and unnecessary assignment to null in the case where pool is already null.

pull/60/head
Brett Wooldridge 11 years ago
parent 04005cf619
commit b7284da738

@ -70,11 +70,6 @@ public class HikariDataSource extends HikariConfig implements DataSource
@Override @Override
public Connection getConnection() throws SQLException public Connection getConnection() throws SQLException
{ {
if (isShutdown)
{
throw new IllegalStateException("The datasource has been shutdown.");
}
if (fastPathPool != null) if (fastPathPool != null)
{ {
return fastPathPool.getConnection(); return fastPathPool.getConnection();
@ -180,9 +175,9 @@ public class HikariDataSource extends HikariConfig implements DataSource
{ {
((DriverDataSource) pool.dataSource).shutdown(); ((DriverDataSource) pool.dataSource).shutdown();
} }
pool = null;
} }
pool = null;
} }
/** {@inheritDoc} */ /** {@inheritDoc} */

Loading…
Cancel
Save