Allow dumping of null arrays
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690772 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c723be5dad
commit
4fbce64e1d
@ -253,6 +253,8 @@ public class HexDump {
|
|||||||
{
|
{
|
||||||
StringBuffer retVal = new StringBuffer();
|
StringBuffer retVal = new StringBuffer();
|
||||||
retVal.append('[');
|
retVal.append('[');
|
||||||
|
if (value != null && value.length > 0)
|
||||||
|
{
|
||||||
for(int x = 0; x < value.length; x++)
|
for(int x = 0; x < value.length; x++)
|
||||||
{
|
{
|
||||||
if (x>0) {
|
if (x>0) {
|
||||||
@ -260,6 +262,7 @@ public class HexDump {
|
|||||||
}
|
}
|
||||||
retVal.append(toHex(value[x]));
|
retVal.append(toHex(value[x]));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
retVal.append(']');
|
retVal.append(']');
|
||||||
return retVal.toString();
|
return retVal.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user