Author: kwall
Date: Tue Mar  3 16:20:07 2015
New Revision: 1663731

URL: http://svn.apache.org/r1663731
Log:
Bug fix: Prevent NPE possibility if closing an object takes too long.

Modified:
    
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
    
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java

Modified: 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java?rev=1663731&r1=1663730&r2=1663731&view=diff
==============================================================================
--- 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
 (original)
+++ 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
 Tue Mar  3 16:20:07 2015
@@ -2035,9 +2035,9 @@ public abstract class AbstractConfigured
                     }
                     remaining = startTime + timeout - 
System.currentTimeMillis();
 
-                    if(remaining < 0)
+                    if(remaining <= 0)
                     {
-                        throw new TimeoutException("Completion did not occur 
within given tiemout: " + timeout);
+                        throw new TimeoutException("Completion did not occur 
within given timeout: " + timeout);
                     }
                 }
             }

Modified: 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java?rev=1663731&r1=1663730&r2=1663731&view=diff
==============================================================================
--- 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
 (original)
+++ 
qpid/branches/QPID-6262-JavaBrokerNIO/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
 Tue Mar  3 16:20:07 2015
@@ -1277,7 +1277,8 @@ public class AMQChannel
 
         // stop all subscriptions
         _rollingBack = true;
-        boolean requiresSuspend = _suspended.compareAndSet(false,true);
+        boolean requiresSuspend = _suspended.compareAndSet(false,true);  // 
TODO This is probably superfluous owing to the
+        // message assignment suspended logic in NBC.
 
         // ensure all subscriptions have seen the change to the channel state
         for(ConsumerTarget_0_8 sub : _tag2SubscriptionTargetMap.values())



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to