yifan-c commented on code in PR #59:
URL: https://github.com/apache/cassandra-sidecar/pull/59#discussion_r1260113220
##########
common/src/main/java/org/apache/cassandra/sidecar/common/JmxClient.java:
##########
@@ -158,6 +162,14 @@ private void connect()
throw new RuntimeException(String.format("Failed to connect to JMX
endpoint %s", jmxServiceURL),
iox);
}
+ catch (SecurityException securityException)
+ {
+ connected = false;
+ String errorMessage = securityException.getMessage() != null
+ ? securityException.getMessage()
+ : "JMX Authentication failed";
+ throw new JmxAuthenticationException(errorMessage,
securityException);
+ }
Review Comment:
Theoretically, it also needs to catch `RuntimeException` since it _could_ be
thrown from the suppliers.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]