INT-1449: fix broken message count in message source monitor

This commit is contained in:
Dave Syer
2010-10-06 11:27:09 -07:00
parent be2b1343a0
commit e2c1616d86

View File

@@ -65,10 +65,11 @@ public class SimpleMessageSourceMonitor implements MethodInterceptor, MessageSou
public Object invoke(MethodInvocation invocation) throws Throwable {
String method = invocation.getMethod().getName();
if ("receive".equals(method)) {
Object result = invocation.proceed();
if ("receive".equals(method) && result!=null) {
messageCount.incrementAndGet();
}
return invocation.proceed();
return result;
}
@Override