Skip to content

Commit

Permalink
added-condition-for-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaHariprasad5123 committed Nov 19, 2024
1 parent 8b87bbf commit 6da9385
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ public static URI getURI(DatasourceConfiguration datasourceConfiguration) throws
&& datasourceConfiguration.getTlsConfiguration() != null
&& datasourceConfiguration.getTlsConfiguration().getTlsEnabled()) {
builder.append(REDIS_SSL_SCHEME);
Endpoint endpoint = datasourceConfiguration.getEndpoints().get(0);
if (endpoint.getPort() != null && endpoint.getPort() == DEFAULT_PORT) {
log.warn("Using default non-TLS port {} with TLS enabled", DEFAULT_PORT);
if (datasourceConfiguration.getEndpoints() != null
&& !datasourceConfiguration.getEndpoints().isEmpty()) {
Endpoint endpoint = datasourceConfiguration.getEndpoints().get(0);
if (endpoint.getPort() != null && endpoint.getPort() == DEFAULT_PORT) {
log.warn("Using default non-TLS port {} with TLS enabled", DEFAULT_PORT);
}
}
} else {
builder.append(REDIS_SCHEME);
Expand Down

0 comments on commit 6da9385

Please sign in to comment.