Skip to content

Commit

Permalink
Code refactoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpaulissen committed May 15, 2024
1 parent 40c320d commit 3e6e470
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,8 @@ private void updatePoolDescription(@NonNull final PoolDataSourceConfigurationHik
poolDataSource.setPoolName(String.join("-", items));
}

if (isParentPoolDataSource) {
// keep poolDataSource.getPoolName() and poolDataSourceConfiguration.getPoolName() in sync
poolDataSourceConfiguration.setPoolName(poolDataSource.getPoolName());
} else {
poolDataSourceConfiguration.setPoolName(getPoolNamePrefix() + "-" + schema); // own prefix
}
// keep poolDataSource.getPoolName() and poolDataSourceConfiguration.getPoolName() in sync
poolDataSourceConfiguration.setPoolName(getPoolNamePrefix() + "-" + schema); // own prefix
} finally {
log.debug("config pool data source; name: {}; address: {}",
poolDataSourceConfiguration.getPoolName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,8 @@ protected void updatePoolDescription(@NonNull final PoolDataSourceConfigurationO
}
}

if (isParentPoolDataSource) {
// keep poolDataSource.getPoolDescription() and poolDataSourceConfiguration.getConnectionPoolName() in sync
poolDataSourceConfiguration.setConnectionPoolName(getPoolDescription(poolDataSource));
} else {
poolDataSourceConfiguration.setConnectionPoolName(getPoolNamePrefix() + "-" + schema); // own prefix
}
// keep poolDataSource.getPoolDescription() and poolDataSourceConfiguration.getConnectionPoolName() in sync
poolDataSourceConfiguration.setConnectionPoolName(getPoolNamePrefix() + "-" + schema); // own prefix
} catch (SQLException ex) {
throw new RuntimeException(SimplePoolDataSource.exceptionToString(ex));
} finally {
Expand Down

0 comments on commit 3e6e470

Please sign in to comment.