ARTEMIS-3433 mitigate NPE
It is technically possible for OpenSSLContextFactoryProvider.getOpenSSLContextFactory() to return null so we need to check to avoid an NPE.
This commit is contained in:
parent
e879ac1485
commit
8cf428ad49
|
@ -71,6 +71,7 @@ import org.apache.activemq.artemis.spi.core.remoting.AcceptorFactory;
|
|||
import org.apache.activemq.artemis.spi.core.remoting.BufferHandler;
|
||||
import org.apache.activemq.artemis.spi.core.remoting.Connection;
|
||||
import org.apache.activemq.artemis.spi.core.remoting.ServerConnectionLifeCycleListener;
|
||||
import org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory;
|
||||
import org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactoryProvider;
|
||||
import org.apache.activemq.artemis.spi.core.remoting.ssl.SSLContextFactoryProvider;
|
||||
import org.apache.activemq.artemis.utils.ActiveMQThreadFactory;
|
||||
|
@ -386,7 +387,10 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
|
|||
return;
|
||||
}
|
||||
SSLContextFactoryProvider.getSSLContextFactory().clearSSLContexts();
|
||||
OpenSSLContextFactoryProvider.getOpenSSLContextFactory().clearSslContexts();
|
||||
OpenSSLContextFactory openSSLContextFactory = OpenSSLContextFactoryProvider.getOpenSSLContextFactory();
|
||||
if (openSSLContextFactory != null) {
|
||||
openSSLContextFactory.clearSslContexts();
|
||||
}
|
||||
|
||||
failureCheckAndFlushThread.close(criticalError);
|
||||
|
||||
|
|
Loading…
Reference in New Issue