Source:
<code>private ServerConnector createHttpsChannelConnector( Server server, HttpConfiguration httpConfig) { httpConfig.setSecureScheme(HTTPS_SCHEME); httpConfig.addCustomizer( new SecureRequestCustomizer(sniHostCheckEnabled)); ServerConnector conn = createHttpChannelConnector(server, httpConfig); SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setNeedClientAuth(needsClientAuth); if (keyPassword != null) { sslContextFactory.setKeyManagerPassword(keyPassword); } if (keyStore != null) { sslContextFactory.setKeyStorePath(keyStore); sslContextFactory.setKeyStoreType(keyStoreType); if (keyStorePassword != null) { sslContextFactory.setKeyStorePassword(keyStorePassword); } } if (trustStore != null) { sslContextFactory.setTrustStorePath(trustStore); sslContextFactory.setTrustStoreType(trustStoreType); if (trustStorePassword != null) { sslContextFactory.setTrustStorePassword(trustStorePassword); } } if(null != excludeCiphers && !excludeCiphers.isEmpty()) { sslContextFactory.setExcludeCipherSuites( StringUtils.getTrimmedStrings(excludeCiphers)); LOG.info("Excluded Cipher List:" + excludeCiphers); } setEnabledProtocols(sslContextFactory); long storesReloadInterval = conf.getLong(FileBasedKeyStoresFactory.SSL_STORES_RELOAD_INTERVAL_TPL_KEY, FileBasedKeyStoresFactory.DEFAULT_SSL_STORES_RELOAD_INTERVAL); <START> this.configurationChangeMonitor = storesReloadInterval > 0 <END> ? Optional.of(this.makeConfigurationChangeMonitor(storesReloadInterval, sslContextFactory)) : Optional.empty(); conn.addFirstConnectionFactory(new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString())); return conn; }</code><technical_language>nit: this.configurationChangeMonitor is Optional.empty? So, change this if (storesReloadInterval > 0) {....}</technical_language>

Target:
private ServerConnector createHttpsChannelConnector( Server server, HttpConfiguration httpConfig) { httpConfig.setSecureScheme(HTTPS_SCHEME); httpConfig.addCustomizer( new SecureRequestCustomizer(sniHostCheckEnabled)); ServerConnector conn = createHttpChannelConnector(server, httpConfig); SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setNeedClientAuth(needsClientAuth); if (keyPassword != null) { sslContextFactory.setKeyManagerPassword(keyPassword); } if (keyStore != null) { sslContextFactory.setKeyStorePath(keyStore); sslContextFactory.setKeyStoreType(keyStoreType); if (keyStorePassword != null) { sslContextFactory.setKeyStorePassword(keyStorePassword); } } if (trustStore != null) { sslContextFactory.setTrustStorePath(trustStore); sslContextFactory.setTrustStoreType(trustStoreType); if (trustStorePassword != null) { sslContextFactory.setTrustStorePassword(trustStorePassword); } } if(null != excludeCiphers && !excludeCiphers.isEmpty()) { sslContextFactory.setExcludeCipherSuites( StringUtils.getTrimmedStrings(excludeCiphers)); LOG.info("Excluded Cipher List:" + excludeCiphers); } setEnabledProtocols(sslContextFactory); long storesReloadInterval = conf.getLong(FileBasedKeyStoresFactory.SSL_STORES_RELOAD_INTERVAL_TPL_KEY, FileBasedKeyStoresFactory.DEFAULT_SSL_STORES_RELOAD_INTERVAL); if (storesReloadInterval > 0) { this.configurationChangeMonitor = Optional.of( this.makeConfigurationChangeMonitor(storesReloadInterval, sslContextFactory)); } conn.addFirstConnectionFactory(new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString())); return conn; }