directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1552601 - /directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
Date Fri, 20 Dec 2013 11:57:26 GMT
Author: elecharny
Date: Fri Dec 20 11:57:25 2013
New Revision: 1552601

URL: http://svn.apache.org/r1552601
Log:
Another small serialization optimization

Modified:
    directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java

Modified: directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java?rev=1552601&r1=1552600&r2=1552601&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
(original)
+++ directory/mavibot/trunk/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
Fri Dec 20 11:57:25 2013
@@ -1255,8 +1255,11 @@ public class RecordManager
         byte[] length = IntSerializer.serialize( buffer.length );
         serializedData.add( length );
 
-        // And store the serialized key now
-        serializedData.add( buffer );
+        // And store the serialized key now if not null
+        if ( buffer.length != 0 )
+        {
+            serializedData.add( buffer );
+        }
 
         return buffer.length + INT_SIZE;
     }



Mime
View raw message