activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r515524 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Date Wed, 07 Mar 2007 10:44:15 GMT
Author: jstrachan
Date: Wed Mar  7 02:44:14 2007
New Revision: 515524

URL: http://svn.apache.org/viewvc?view=rev&rev=515524
Log:
minor patch to avoid ClassCastException for AMQ-1189

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?view=diff&rev=515524&r1=515523&r2=515524
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Wed Mar  7 02:44:14 2007
@@ -731,9 +731,10 @@
 
             if(command.isMessageDispatch()){
                 MessageDispatch md=(MessageDispatch) command;
-                Runnable sub=(Runnable) md.getConsumer();
                 broker.processDispatch(md);
-                if(sub!=null){
+                Object consumer = md.getConsumer();
+                if (consumer instanceof Runnable) {
+                    Runnable sub=(Runnable) consumer;
                     sub.run();
                 }
             }



Mime
View raw message