Skip to content

Commit

Permalink
Rename StorageUnitNodeMapCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Oct 6, 2023
1 parent 140f2af commit 13cb210
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ private static StorageNode create(final String storageUnitName, final DataSource
return create(storageUnitName, url, standardProps.get("username").toString(), isInstanceConnectionAvailable);
}

private static StorageNode create(final String dataSourceName, final String url, final String username, final boolean isInstanceConnectionAvailable) {
private static StorageNode create(final String storageUnitName, final String url, final String username, final boolean isInstanceConnectionAvailable) {
try {
JdbcUrl jdbcUrl = new StandardJdbcUrlParser().parse(url);
return isInstanceConnectionAvailable ? new StorageNode(jdbcUrl.getHostname(), jdbcUrl.getPort(), username) : new StorageNode(dataSourceName);
return isInstanceConnectionAvailable ? new StorageNode(jdbcUrl.getHostname(), jdbcUrl.getPort(), username) : new StorageNode(storageUnitName);
} catch (final UnrecognizedDatabaseURLException ex) {
return new StorageNode(dataSourceName);
return new StorageNode(storageUnitName);
}
}
}

0 comments on commit 13cb210

Please sign in to comment.