directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1416610 - in /directory/shared/trunk/ldap/extras: codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/ codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/
Date Mon, 03 Dec 2012 18:15:36 GMT
Author: elecharny
Date: Mon Dec  3 18:15:34 2012
New Revision: 1416610

URL: http://svn.apache.org/viewvc?rev=1416610&view=rev
Log:
Fixed a NPE in the toStringmethod : we werent initializing the SyncInfoValue type

Modified:
    directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncInfoValueImpl.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueDecorator.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java

Modified: directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncInfoValueImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncInfoValueImpl.java?rev=1416610&r1=1416609&r2=1416610&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncInfoValueImpl.java
(original)
+++ directory/shared/trunk/ldap/extras/codec-api/src/main/java/org/apache/directory/shared/ldap/extras/controls/SyncInfoValueImpl.java
Mon Dec  3 18:15:34 2012
@@ -294,7 +294,7 @@ public class SyncInfoValueImpl extends A
         {
             case NEW_COOKIE:
                 sb.append( "        newCookie : '" ).
-                    append( Strings.dumpBytes( getCookie() ) ).append( "'\n" );
+                    append( Strings.utf8ToString( getCookie() ) ).append( "'\n" );
                 break;
 
             case REFRESH_DELETE:

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueDecorator.java?rev=1416610&r1=1416609&r2=1416610&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueDecorator.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueDecorator.java
Mon Dec  3 18:15:34 2012
@@ -544,4 +544,13 @@ public class SyncInfoValueDecorator exte
         decoder.decode( bb, container );
         return this;
     }
+    
+    
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return getDecorated().toString();
+    }
 }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java?rev=1416610&r1=1416609&r2=1416610&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java
(original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java
Mon Dec  3 18:15:34 2012
@@ -31,6 +31,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.BerValue;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
+import org.apache.directory.shared.ldap.extras.controls.SynchronizationInfoEnum;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -100,6 +101,7 @@ public final class SyncInfoValueGrammar 
                     public void action( SyncInfoValueContainer container )
                     {
                         SyncInfoValue control = container.getSyncInfoValueControl();
+                        control.setType( SynchronizationInfoEnum.NEW_COOKIE );
 
                         BerValue value = container.getCurrentTLV().getValue();
 
@@ -138,6 +140,7 @@ public final class SyncInfoValueGrammar 
                     public void action( SyncInfoValueContainer container )
                     {
                         SyncInfoValue control = container.getSyncInfoValueControl();
+                        control.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
                         container.setSyncInfoValueControl( control );
 
@@ -299,6 +302,7 @@ public final class SyncInfoValueGrammar 
                     public void action( SyncInfoValueContainer container )
                     {
                         SyncInfoValue control = container.getSyncInfoValueControl();
+                        control.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
                         container.setSyncInfoValueControl( control );
 
@@ -459,6 +463,7 @@ public final class SyncInfoValueGrammar 
                     public void action( SyncInfoValueContainer container )
                     {
                         SyncInfoValue control = container.getSyncInfoValueControl();
+                        control.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
                         container.setSyncInfoValueControl( control );
                     }



Mime
View raw message