avoid NPE

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@400057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-05-05 12:12:23 +00:00
parent ac13202007
commit 89d6fd0a80
1 changed files with 5 additions and 1 deletions

View File

@ -130,7 +130,11 @@ public class PartialCommand implements Command {
}
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)]";
}