INT-2232 GCIBPP Don't Emit Stack Trace

Previously, a (DEBUG) stack trace was logged when we tried
to intercept NullChannel with a Global Channel Interceptor.
This commit is contained in:
Gary Russell
2011-11-09 10:57:49 -05:00
committed by Mark Fisher
parent a0a09f7e66
commit eeeeed5c69

View File

@@ -29,6 +29,7 @@ import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.NotReadablePropertyException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.core.OrderComparator;
@@ -142,6 +143,9 @@ final class GlobalChannelInterceptorBeanPostProcessor implements BeanPostProcess
return (List<ChannelInterceptor>) new DirectFieldAccessor(interceptorListWrapper).getPropertyValue("interceptors");
}
}
catch (NotReadablePropertyException e) {
// Channel doesn't support interceptors - null return logged by caller
}
catch (Exception e) {
// interceptors not supported, will return null
if (logger.isDebugEnabled() && channel != null) {