Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,8 @@ public long getRetryInterval() {
// Pick trust store config from the given path
sslTrustStore = KeyStore.getInstance(SSL_TRUST_STORE_TYPE);
try (FileInputStream fis = new FileInputStream(sslTrustStorePath)) {
sslTrustStore.load(fis, sslTrustStorePassword.toCharArray());
sslTrustStore.load(
fis, sslTrustStorePassword != null ? sslTrustStorePassword.toCharArray() : null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run mvn spotless:apply, automatically applies rule to a new line.

}
sslContext = SSLContexts.custom().loadTrustMaterial(sslTrustStore, null).build();
socketFactory =
Expand Down Expand Up @@ -685,7 +686,8 @@ SSLConnectionSocketFactory getTwoWaySSLSocketFactory() throws SQLException {
SSL_TRUST_STORE + " Not configured for 2 way SSL connection");
}
try (FileInputStream fis = new FileInputStream(trustStorePath)) {
sslTrustStore.load(fis, trustStorePassword.toCharArray());
sslTrustStore.load(
fis, trustStorePassword != null ? trustStorePassword.toCharArray() : null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run mvn spotless:apply, automatically applies rule to a new line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks for the explantation

}
trustManagerFactory.init(sslTrustStore);
SSLContext context = SSLContext.getInstance("TLS");
Expand Down