Skip to content

Commit 39de7ad

Browse files
committed
Renamed objects
Signed-off-by: Hakky54 <[email protected]>
1 parent 9c3fa93 commit 39de7ad

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

jmx_prometheus_common/src/main/java/io/prometheus/jmx/common/HTTPServerFactory.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,13 @@ public static void configureSSL(
681681
if (rootMapAccessor.containsPath("/httpServer/ssl")) {
682682
try {
683683
boolean mutualTLS = isMutualTls(rootMapAccessor);
684-
SSLFactory baseSslFactory = createSslFactory(rootMapAccessor);
685-
Runnable sslUpdater = () -> reloadSsl(baseSslFactory, rootMapAccessor);
684+
SSLFactory sslFactory = createSslFactory(rootMapAccessor);
685+
Runnable sslUpdater = () -> reloadSsl(sslFactory, rootMapAccessor);
686686
// check every hour for file changes and if it has been modified update the ssl configuration
687687
EXECUTOR_SERVICE.scheduleAtFixedRate(sslUpdater, 1, 1, TimeUnit.HOURS);
688688

689689
httpServerBuilder.httpsConfigurator(
690-
new HttpsConfigurator(baseSslFactory.getSslContext()) {
690+
new HttpsConfigurator(sslFactory.getSslContext()) {
691691
@Override
692692
public void configure(HttpsParameters params) {
693693
SSLParameters sslParameters =
@@ -729,7 +729,7 @@ private static SSLFactory createSslFactory(MapAccessor rootMapAccessor) {
729729
}
730730

731731
@SuppressWarnings("OptionalGetWithoutIsPresent")
732-
private static void reloadSsl(SSLFactory baseSslFactory, MapAccessor rootMapAccessor) {
732+
private static void reloadSsl(SSLFactory sslFactory, MapAccessor rootMapAccessor) {
733733
KeyStoreProperties keyProps = getKeyStoreProperties(rootMapAccessor);
734734
Optional<KeyStoreProperties> trustProps = getTrustStoreProperties(rootMapAccessor);
735735

@@ -740,7 +740,7 @@ private static void reloadSsl(SSLFactory baseSslFactory, MapAccessor rootMapAcce
740740
keyProps.getFilename(), keyProps.getPassword(), keyProps.getType());
741741
X509ExtendedKeyManager keyManager =
742742
KeyManagerUtils.createKeyManager(keyStore, keyProps.getPassword());
743-
KeyManagerUtils.swapKeyManager(baseSslFactory.getKeyManager().get(), keyManager);
743+
KeyManagerUtils.swapKeyManager(sslFactory.getKeyManager().get(), keyManager);
744744
keyStoreProperties = keyProps;
745745
sslUpdated = true;
746746
}
@@ -757,13 +757,13 @@ && getTrustStoreProperties().get()
757757
trustProps.get().getType());
758758
X509ExtendedTrustManager trustManager = TrustManagerUtils.createTrustManager(keyStore);
759759
TrustManagerUtils.swapTrustManager(
760-
baseSslFactory.getTrustManager().get(), trustManager);
760+
sslFactory.getTrustManager().get(), trustManager);
761761
trustStoreProperties = trustProps.get();
762762
sslUpdated = true;
763763
}
764764

765765
if (sslUpdated) {
766-
SSLSessionUtils.invalidateCaches(baseSslFactory);
766+
SSLSessionUtils.invalidateCaches(sslFactory);
767767
}
768768
}
769769

0 commit comments

Comments
 (0)