Create SQL data source utils class
- Extract logic used in SQLite and MySQL for logging and closing SQL objects
- Decided to leave buildAuthFromResultSet methods individually as this might be more implementation-specific
- Rename DataSource#close to DataSource#closeConnection to fix conflict with static import
This commit is contained in:
@@ -152,7 +152,7 @@ public class CacheDataSource implements DataSource {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
public void closeConnection() {
|
||||
executorService.shutdown();
|
||||
try {
|
||||
executorService.awaitTermination(5, TimeUnit.SECONDS);
|
||||
@@ -160,7 +160,7 @@ public class CacheDataSource implements DataSource {
|
||||
ConsoleLogger.logException("Could not close executor service:", e);
|
||||
}
|
||||
cachedAuths.invalidateAll();
|
||||
source.close();
|
||||
source.closeConnection();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user