activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r400057 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
Date Fri, 05 May 2006 12:12:24 GMT
Author: jstrachan
Date: Fri May  5 05:12:23 2006
New Revision: 400057

URL: http://svn.apache.org/viewcvs?rev=400057&view=rev
Log:
avoid NPE

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java?rev=400057&r1=400056&r2=400057&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/PartialCommand.java
Fri May  5 05:12:23 2006
@@ -130,7 +130,11 @@
     }
 
     public String toString() {
-        return "PartialCommand[id: " + commandId + " data: " + data.length + " byte(s)]";
+        int size = 0;
+        if (data != null) {
+            size = data.length;
+        }
+        return "PartialCommand[id: " + commandId + " data: " + size + " byte(s)]";
     }
     
     



Mime
View raw message