minor patch to avoid ClassCastException for AMQ-1189

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@515524 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2007-03-07 10:44:14 +00:00
parent d00ce72595
commit d57343cdb5
1 changed files with 3 additions and 2 deletions

View File

@ -731,9 +731,10 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
if(command.isMessageDispatch()){ if(command.isMessageDispatch()){
MessageDispatch md=(MessageDispatch) command; MessageDispatch md=(MessageDispatch) command;
Runnable sub=(Runnable) md.getConsumer();
broker.processDispatch(md); broker.processDispatch(md);
if(sub!=null){ Object consumer = md.getConsumer();
if (consumer instanceof Runnable) {
Runnable sub=(Runnable) consumer;
sub.run(); sub.run();
} }
} }