Skip to content

Commit

Permalink
rollback changes
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Hernán Carle <pablo.carle@broadcom.com>
  • Loading branch information
Pablo Hernán Carle committed Jul 21, 2023
1 parent dc1284b commit 4fb5c96
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,22 @@
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import org.zowe.apiml.security.*;
import org.zowe.apiml.security.ApimlPoolingHttpClientConnectionManager;
import org.zowe.apiml.security.HttpsConfig;
import org.zowe.apiml.security.HttpsConfigError;
import org.zowe.apiml.security.HttpsFactory;
import org.zowe.apiml.security.SecurityUtils;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;

import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
Expand Down Expand Up @@ -114,7 +117,6 @@ public class HttpConfig {
private SSLContext secureSslContext;
private HostnameVerifier secureHostnameVerifier;
private EurekaJerseyClientBuilder eurekaJerseyClientBuilder;
private ApplicationContext context;
private final Timer connectionManagerTimer = new Timer(
"ApimlHttpClientConfiguration.connectionManagerTimer", true);

Expand Down Expand Up @@ -175,11 +177,11 @@ public void init() {
publicKeyCertificatesBase64 = SecurityUtils.loadCertificateChainBase64(httpsConfig);

} catch (HttpsConfigError e) {
log.error("Invalid configuration of HTTPs: {}", e.getMessage()); // Why not print stack trace? Should we have a log for stacktraces only?
SpringApplication.exit(context, () -> 1);
log.error("Invalid configuration of HTTPs: {}", e.getMessage());
System.exit(1);
} catch (Exception e) {
log.error("Cannot construct configuration of HTTPs: {}", e.getMessage());
SpringApplication.exit(context, () -> 1);
System.exit(1);
}
}

Expand Down

0 comments on commit 4fb5c96

Please sign in to comment.