directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1587959 - /directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
Date Wed, 16 Apr 2014 16:18:23 GMT
Author: elecharny
Date: Wed Apr 16 16:18:22 2014
New Revision: 1587959

URL: http://svn.apache.org/r1587959
Log:
o added the class header
o The cookie is copied instead of being affected

Modified:
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java?rev=1587959&r1=1587958&r2=1587959&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/api/ldap/extras/controls/ad/AdDirSyncImpl.java
Wed Apr 16 16:18:22 2014
@@ -26,6 +26,7 @@ import org.apache.directory.api.ldap.mod
 import org.apache.directory.api.util.Strings;
 
 /**
+ * The class implemnting the AdDirsSync interface
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -99,7 +100,15 @@ public class AdDirSyncImpl extends Abstr
      */
     public void setCookie( byte[] cookie )
     {
-        this.cookie = cookie;
+        if ( cookie != null )
+        {
+            this.cookie = new byte[cookie.length];
+            System.arraycopy( cookie, 0, this.cookie, 0,cookie.length );
+        }
+        else
+        {
+            this.cookie = Strings.EMPTY_BYTES;
+        }
     }
     
     



Mime
View raw message