INT-1361 NPE If Empty Interceptor Factory Chain Configured

This commit is contained in:
Gary Russell
2010-08-18 17:15:14 +00:00
parent faed0b39cf
commit 8b2346aa34

View File

@@ -325,8 +325,12 @@ public abstract class AbstractConnectionFactory
if (this.interceptorFactoryChain == null) {
return connection;
}
for (TcpConnectionInterceptorFactory factory :
this.interceptorFactoryChain.getInterceptorFactories()) {
TcpConnectionInterceptorFactory[] interceptorFactories =
this.interceptorFactoryChain.getInterceptorFactories();
if (interceptorFactories == null) {
return connection;
}
for (TcpConnectionInterceptorFactory factory : interceptorFactories) {
TcpConnectionInterceptor wrapper = factory.getInterceptor();
wrapper.setTheConnection(connection);
// if no ultimate listener or sender, register each wrapper in turn