我无法在catch块中捕获SSLHandshakeException,并怀疑它是AsynchronousJiraRestClientFactory的异步性质。关于正确处理的任何想法。我想在捕获异常时执行重试操作。
try {
URI jiraServerUri = URI.create(uri);
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);
return restClient;
} catch (Exception e) {
logger.error("Caught exception ", e);
throw e;
}