HBASE-3065 don't prepend MAGIC if data is empty

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1153300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-08-02 23:01:03 +00:00
parent c75e396fb6
commit b41f705662
1 changed files with 3 additions and 3 deletions

View File

@ -598,8 +598,8 @@ public class RecoverableZooKeeper {
}
private byte[] appendMetaData(byte[] data) {
if(data == null){
return null;
if(data == null || data.length == 0){
return data;
}
byte[] newData = new byte[MAGIC_OFFSET+ID_OFFSET+id.length+data.length];
@ -658,4 +658,4 @@ public class RecoverableZooKeeper {
}
return lockChildren;
}
}
}