activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r739950 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Date Mon, 02 Feb 2009 09:28:28 GMT
Author: dejanb
Date: Mon Feb  2 09:28:28 2009
New Revision: 739950

URL: http://svn.apache.org/viewvc?rev=739950&view=rev
Log:
fix for https://issues.apache.org/activemq/browse/AMQ-2092

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?rev=739950&r1=739949&r2=739950&view=diff
==============================================================================
--- 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
Mon Feb  2 09:28:28 2009
@@ -175,6 +175,9 @@
             public void onCommand(Object o) {
                 serviceLock.readLock().lock();
                 try {
+                    if (!(o instanceof Command)) {
+                        throw new RuntimeException("Protocol violation - Command corrupted");
+                    }
                     Command command = (Command)o;
                     Response response = service(command);
                     if (response != null) {



Mime
View raw message