activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1396975 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
Date Thu, 11 Oct 2012 10:22:46 GMT
Author: tabish
Date: Thu Oct 11 10:22:46 2012
New Revision: 1396975

URL: http://svn.apache.org/viewvc?rev=1396975&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-4095

Add check null on engine. 

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java?rev=1396975&r1=1396974&r2=1396975&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/nio/NIOOutputStream.java
Thu Oct 11 10:22:46 2012
@@ -197,7 +197,7 @@ public class NIOOutputStream extends Out
                 // wrap more packets until we reach the end of data, but only when plain
                 // has no more space since we are non-blocking and a write might not have
                 // written anything.
-                if (data.hasRemaining() && !plain.hasRemaining()) {
+                if (engine != null && data.hasRemaining() && !plain.hasRemaining())
{
                     plain.clear();
                     engine.wrap(data, plain);
                     plain.flip();



Mime
View raw message