directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1065291 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication: syncDoneValue/ syncInfoValue/ syncRequestValue/
Date Sun, 30 Jan 2011 14:25:27 GMT
Author: elecharny
Date: Sun Jan 30 14:25:27 2011
New Revision: 1065291

URL: http://svn.apache.org/viewvc?rev=1065291&view=rev
Log:
Some more fixes in Replicaton controls

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java?rev=1065291&r1=1065290&r2=1065291&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueDecorator.java
Sun Jan 30 14:25:27 2011
@@ -182,7 +182,7 @@ public class SyncDoneValueDecorator exte
     public void setCookie( byte[] cookie )
     {
         // Copy the bytes
-        if ( cookie != null )
+        if ( !Strings.isEmpty( cookie ) )
         {
             byte[] copy = new byte[cookie.length];
             System.arraycopy( cookie, 0, copy, 0, cookie.length );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java?rev=1065291&r1=1065290&r2=1065291&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueDecorator.java
Sun Jan 30 14:25:27 2011
@@ -118,7 +118,7 @@ public class SyncInfoValueDecorator exte
     public void setCookie( byte[] cookie )
     {
         // Copy the bytes
-        if ( cookie != null )
+        if ( !Strings.isEmpty( cookie ) )
         {
             byte[] copy = new byte[cookie.length];
             System.arraycopy( cookie, 0, copy, 0, cookie.length );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java?rev=1065291&r1=1065290&r2=1065291&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueDecorator.java
Sun Jan 30 14:25:27 2011
@@ -97,7 +97,17 @@ public class SyncRequestValueDecorator  
      */
     public void setCookie( byte[] cookie )
     {
-        getDecorated().setCookie( cookie );
+        // Copy the bytes
+        if ( !Strings.isEmpty( cookie ) )
+        {
+            byte[] copy = new byte[cookie.length];
+            System.arraycopy( cookie, 0, copy, 0, cookie.length );
+            getDecorated().setCookie( copy );
+        }
+        else
+        {
+            getDecorated().setCookie( null );
+        }
     }
 
     



Mime
View raw message