codelipenghui commented on a change in pull request #14253:
URL: https://github.com/apache/pulsar/pull/14253#discussion_r805115592
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java
##########
@@ -72,7 +72,10 @@ public PulsarChannelInitializer(ClientConfigurationData
conf, Supplier<ClientCnx
if (tlsEnabled) {
if (tlsEnabledWithKeyStore) {
AuthenticationDataProvider authData1 =
conf.getAuthentication().getAuthData();
-
+ if (conf.getTlsTrustStorePath() == null) {
+ throw new RuntimeException("Failed to create TLS context,
Due to empty "
Review comment:
I think it's better to use like "Failed to create TLS context, the
tlsTrustStorePath need to be configured if useKeyStoreTls enabled" ?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java
##########
@@ -72,7 +72,10 @@ public PulsarChannelInitializer(ClientConfigurationData
conf, Supplier<ClientCnx
if (tlsEnabled) {
if (tlsEnabledWithKeyStore) {
AuthenticationDataProvider authData1 =
conf.getAuthentication().getAuthData();
-
+ if (conf.getTlsTrustStorePath() == null) {
+ throw new RuntimeException("Failed to create TLS context,
Due to empty "
Review comment:
We should throw PulsarClientException?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarChannelInitializer.java
##########
@@ -72,7 +72,10 @@ public PulsarChannelInitializer(ClientConfigurationData
conf, Supplier<ClientCnx
if (tlsEnabled) {
if (tlsEnabledWithKeyStore) {
AuthenticationDataProvider authData1 =
conf.getAuthentication().getAuthData();
-
+ if (conf.getTlsTrustStorePath() == null) {
Review comment:
We should check if it is an empty String? Empty string also does not
make any sense here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]