directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1163982 - in /directory: apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/ shared/trunk/ldap/extras/codec/sr...
Date Thu, 01 Sep 2011 10:22:06 GMT
Author: elecharny
Date: Thu Sep  1 10:22:06 2011
New Revision: 1163982

URL: http://svn.apache.org/viewvc?rev=1163982&view=rev
Log:
Used the interface instead of Decorator classes i the code

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueContainer.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueContainer.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueGrammar.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueContainer.java
    directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueContainer.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueControlTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueControlTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java
    directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/SyncReplRequestHandler.java Thu Sep  1 10:22:06 2011
@@ -369,11 +369,11 @@ public class SyncReplRequestHandler impl
             IntermediateResponse intermResp = new IntermediateResponseImpl( req.getMessageId() );
             intermResp.setResponseName( SyncInfoValue.OID );
 
-            SyncInfoValueDecorator syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
+            SyncInfoValue syncInfo = new SyncInfoValueDecorator( ldapServer.getDirectoryService()
                 .getLdapCodecService(),
                 SynchronizationInfoEnum.NEW_COOKIE );
             syncInfo.setCookie( cookie );
-            intermResp.setResponseValue( syncInfo.getValue() );
+            intermResp.setResponseValue( ((SyncInfoValueDecorator)syncInfo).getValue() );
 
             PROVIDER_LOG.debug( "Sent the intermediate response to the {} consumer, {}", replicaLog.getId(), intermResp );
             session.getIoSession().write( intermResp );
@@ -1084,7 +1084,7 @@ public class SyncReplRequestHandler impl
     {
         SearchResultDone searchDoneResp = ( SearchResultDone ) req.getResultResponse();
         searchDoneResp.getLdapResult().setResultCode( ResultCodeEnum.E_SYNC_REFRESH_REQUIRED );
-        SyncDoneValueDecorator syncDone = new SyncDoneValueDecorator(
+        SyncDoneValue syncDone = new SyncDoneValueDecorator(
             ldapServer.getDirectoryService().getLdapCodecService() );
         searchDoneResp.addControl( syncDone );
 

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/replication/MockSyncReplConsumer.java Thu Sep  1 10:22:06 2011
@@ -371,10 +371,10 @@ public class MockSyncReplConsumer implem
         {
             LOG.debug( "............... inside handleSyncInfo ..............." );
 
-            SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( ldapCodecService );
+            SyncInfoValue decorator = new SyncInfoValueDecorator( ldapCodecService );
             byte[] syncinfo = syncInfoResp.getResponseValue();
-            decorator.setValue( syncinfo );
-            SyncInfoValue syncInfoValue = decorator.getDecorated();
+            ((SyncInfoValueDecorator)decorator).setValue( syncinfo );
+            SyncInfoValue syncInfoValue = ((SyncInfoValueDecorator)decorator).getDecorated();
 
             byte[] cookie = syncInfoValue.getCookie();
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueContainer.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/SyncDoneValueContainer.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueContainer.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueContainer.java Thu Sep  1 10:22:06 2011
@@ -22,6 +22,7 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
+import org.apache.directory.shared.ldap.extras.controls.SyncDoneValue;
 
 
 /**
@@ -33,7 +34,7 @@ import org.apache.directory.shared.ldap.
 public class SyncDoneValueContainer extends AbstractContainer
 {
     /** syncDoneValue*/
-    private SyncDoneValueDecorator control;
+    private SyncDoneValue control;
 
     private LdapApiService codec;
     
@@ -59,7 +60,7 @@ public class SyncDoneValueContainer exte
      * Creates a new SyncDoneValueControlContainer object.
      *
      */
-    public SyncDoneValueContainer( LdapApiService codec, SyncDoneValueDecorator control )
+    public SyncDoneValueContainer( LdapApiService codec, SyncDoneValue control )
     {
         super();
         this.codec = codec;
@@ -73,7 +74,7 @@ public class SyncDoneValueContainer exte
     /**
      * @return the SyncDoneValueControlCodec object
      */
-    public SyncDoneValueDecorator getSyncDoneValueControl()
+    public SyncDoneValue getSyncDoneValueControl()
     {
         return control;
     }
@@ -85,7 +86,7 @@ public class SyncDoneValueContainer exte
      * 
      * @param control the SyncDoneValueControlCodec to set.
      */
-    public void setSyncDoneValueControl( SyncDoneValueDecorator control )
+    public void setSyncDoneValueControl( SyncDoneValue control )
     {
         this.control = control;
     }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueContainer.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/SyncInfoValueContainer.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueContainer.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueContainer.java Thu Sep  1 10:22:06 2011
@@ -22,6 +22,7 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
+import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
 
 
 /**
@@ -32,7 +33,7 @@ import org.apache.directory.shared.ldap.
 public class SyncInfoValueContainer extends AbstractContainer
 {
     /** SyncInfoValueControl */
-    private SyncInfoValueDecorator control;
+    private SyncInfoValue control;
 
     private LdapApiService codec;
 
@@ -56,7 +57,7 @@ public class SyncInfoValueContainer exte
      * Creates a new SyncInfoValueControlContainer object. We will store one grammar,
      * it's enough ...
      */
-    public SyncInfoValueContainer( LdapApiService codec, SyncInfoValueDecorator control )
+    public SyncInfoValueContainer( LdapApiService codec, SyncInfoValue control )
     {
         super();
         this.codec = codec;
@@ -70,7 +71,7 @@ public class SyncInfoValueContainer exte
     /**
      * @return Returns the syncInfoValue control.
      */
-    public SyncInfoValueDecorator getSyncInfoValueControl()
+    public SyncInfoValue getSyncInfoValueControl()
     {
         return control;
     }
@@ -82,7 +83,7 @@ public class SyncInfoValueContainer exte
      * 
      * @param control the SyncInfoValueControlCodec to set.
      */
-    public void setSyncInfoValueControl( SyncInfoValueDecorator control )
+    public void setSyncInfoValueControl( SyncInfoValue control )
     {
         this.control = control;
     }

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=1163982&r1=1163981&r2=1163982&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 Thu Sep  1 10:22:06 2011
@@ -30,6 +30,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.extras.controls.SyncInfoValue;
 import org.apache.directory.shared.util.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -98,7 +99,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
 
                     Value value = container.getCurrentTLV().getValue();
 
@@ -136,7 +137,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     container.setSyncInfoValueControl( control );
 
@@ -162,7 +163,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -199,7 +200,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -250,7 +251,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -301,7 +302,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     container.setSyncInfoValueControl( control );
 
@@ -327,7 +328,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -366,7 +367,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -417,7 +418,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -467,7 +468,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     container.setSyncInfoValueControl( control );
                 }
@@ -490,7 +491,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container )
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -524,7 +525,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -568,7 +569,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -681,7 +682,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 
@@ -726,7 +727,7 @@ public final class SyncInfoValueGrammar 
             {
                 public void action( SyncInfoValueContainer container ) throws DecoderException
                 {
-                    SyncInfoValueDecorator control = container.getSyncInfoValueControl();
+                    SyncInfoValue control = container.getSyncInfoValueControl();
                     
                     Value value = container.getCurrentTLV().getValue();
 

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueContainer.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/SyncRequestValueContainer.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueContainer.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueContainer.java Thu Sep  1 10:22:06 2011
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
 
 
 /**
@@ -31,7 +32,7 @@ import org.apache.directory.shared.asn1.
 public class SyncRequestValueContainer extends AbstractContainer
 {
     /** SyncRequestValueControl */
-    private SyncRequestValueDecorator control;
+    private SyncRequestValue control;
 
 
     /**
@@ -51,7 +52,7 @@ public class SyncRequestValueContainer e
      * Creates a new SyncRequestValueControlContainer object. We will store one grammar,
      * it's enough ...
      */
-    public SyncRequestValueContainer( SyncRequestValueDecorator control )
+    public SyncRequestValueContainer( SyncRequestValue control )
     {
         super();
         this.control = control;
@@ -64,7 +65,7 @@ public class SyncRequestValueContainer e
     /**
      * @return Returns the syncRequestValue control.
      */
-    public SyncRequestValueDecorator getSyncRequestValueControl()
+    public SyncRequestValue getSyncRequestValueControl()
     {
         return control;
     }
@@ -76,7 +77,7 @@ public class SyncRequestValueContainer e
      * 
      * @param control the SyncRequestValueControl to set.
      */
-    public void setSyncRequestValueControl( SyncRequestValueDecorator control )
+    public void setSyncRequestValueControl( SyncRequestValue control )
     {
         this.control = control;
     }

Modified: directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueContainer.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/SyncStateValueContainer.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueContainer.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/main/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueContainer.java Thu Sep  1 10:22:06 2011
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.ldap.extras.controls.SyncStateValue;
 
 
 /**
@@ -31,7 +32,7 @@ import org.apache.directory.shared.asn1.
 public class SyncStateValueContainer extends AbstractContainer
 {
     /** SyncStateValueControl */
-    private SyncStateValueDecorator control;
+    private SyncStateValue control;
 
 
     /**
@@ -51,7 +52,7 @@ public class SyncStateValueContainer ext
      * Creates a new SyncStateValueControlContainer object. We will store one grammar,
      * it's enough ...
      */
-    public SyncStateValueContainer( SyncStateValueDecorator control )
+    public SyncStateValueContainer( SyncStateValue control )
     {
         super();
         this.control = control;
@@ -64,7 +65,7 @@ public class SyncStateValueContainer ext
     /**
      * @return Returns the syncStateValue control.
      */
-    public SyncStateValueDecorator getSyncStateValueControl()
+    public SyncStateValue getSyncStateValueControl()
     {
         return control;
     }
@@ -76,7 +77,7 @@ public class SyncStateValueContainer ext
      * 
      * @param control the SyncStateValueControl to set.
      */
-    public void setSyncStateValueControl( SyncStateValueDecorator control )
+    public void setSyncStateValueControl( SyncStateValue control )
     {
         this.control = control;
     }

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueControlTest.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncDoneValueControlTest.java Thu Sep  1 10:22:06 2011
@@ -63,9 +63,9 @@ public class SyncDoneValueControlTest ex
 
         bb.flip();
 
-        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
+        SyncDoneValue decorator =  new SyncDoneValueDecorator( codec );
 
-        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)((SyncDoneValueDecorator)decorator).decode( bb.array() );
         
         assertEquals( "xkcd", Strings.utf8ToString(control.getCookie()) );
         assertTrue( control.isRefreshDeletes() );
@@ -99,9 +99,9 @@ public class SyncDoneValueControlTest ex
 
         bb.flip();
 
-        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
+        SyncDoneValue decorator =  new SyncDoneValueDecorator( codec );
 
-        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)((SyncDoneValueDecorator)decorator).decode( bb.array() );
 
         assertNull( control.getCookie() );
         assertTrue( control.isRefreshDeletes() );
@@ -133,9 +133,9 @@ public class SyncDoneValueControlTest ex
 
         bb.flip();
 
-        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
+        SyncDoneValue decorator =  new SyncDoneValueDecorator( codec );
 
-        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)((SyncDoneValueDecorator)decorator).decode( bb.array() );
 
         assertNull( control.getCookie() );
         assertFalse( control.isRefreshDeletes() );
@@ -156,9 +156,9 @@ public class SyncDoneValueControlTest ex
 
         bb.flip();
 
-        SyncDoneValueDecorator decorator =  new SyncDoneValueDecorator( codec );
+        SyncDoneValue decorator =  new SyncDoneValueDecorator( codec );
 
-        SyncDoneValue control = (SyncDoneValue)decorator.decode( bb.array() );
+        SyncDoneValue control = (SyncDoneValue)((SyncDoneValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( "", Strings.utf8ToString(control.getCookie()) );
         assertFalse( control.isRefreshDeletes() );

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueControlTest.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncInfoValueControlTest.java Thu Sep  1 10:22:06 2011
@@ -67,10 +67,10 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         decorator.setType( SynchronizationInfoEnum.NEW_COOKIE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.NEW_COOKIE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -102,10 +102,10 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         decorator.setType( SynchronizationInfoEnum.NEW_COOKIE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.NEW_COOKIE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -143,11 +143,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -192,11 +192,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -231,11 +231,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -270,11 +270,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -307,11 +307,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_DELETE );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_DELETE, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -350,11 +350,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -399,11 +399,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -438,11 +438,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -477,11 +477,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -514,11 +514,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.REFRESH_PRESENT );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.REFRESH_PRESENT, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -554,13 +554,13 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not get there" );
         }
         catch ( DecoderException de )
@@ -586,13 +586,13 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not get there" );
         }
         catch ( DecoderException de )
@@ -618,13 +618,13 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not get there" );
         }
         catch ( DecoderException de )
@@ -651,13 +651,13 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not get there" );
         }
         catch ( DecoderException de )
@@ -683,11 +683,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -732,11 +732,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -783,11 +783,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -833,11 +833,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -884,11 +884,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -944,11 +944,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -1015,11 +1015,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -1077,11 +1077,11 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
-        SyncInfoValue syncInfoValue = (SyncInfoValue)decorator.decode( bb.array() );
+        SyncInfoValue syncInfoValue = (SyncInfoValue)((SyncInfoValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationInfoEnum.SYNC_ID_SET, syncInfoValue.getType() );
         assertEquals( "abc", Strings.utf8ToString(syncInfoValue.getCookie()) );
@@ -1152,13 +1152,13 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not be there" );
         }
         catch ( DecoderException de )
@@ -1190,12 +1190,12 @@ public class SyncInfoValueControlTest ex
             } );
         bb.flip();
 
-        SyncInfoValueDecorator decorator = new SyncInfoValueDecorator( codec );
+        SyncInfoValue decorator = new SyncInfoValueDecorator( codec );
         decorator.setType( SynchronizationInfoEnum.SYNC_ID_SET );
 
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncInfoValueDecorator)decorator).decode( bb.array() );
             fail( "Should not be there" );
         }
         catch ( DecoderException de )

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncRequestValueControlTest.java Thu Sep  1 10:22:06 2011
@@ -67,9 +67,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_ONLY, syncRequestValue.getMode() );
         assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
@@ -119,9 +119,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
@@ -170,9 +170,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator(  codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator(  codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -221,9 +221,9 @@ public class SyncRequestValueControlTest
             } );
         buffer.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( buffer.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( buffer.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -261,9 +261,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertNull( syncRequestValue.getCookie() );
@@ -301,9 +301,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
@@ -341,9 +341,9 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
-        SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
+        SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
         assertEquals( "", Strings.utf8ToString(syncRequestValue.getCookie()) );
@@ -387,11 +387,11 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncRequestValueDecorator)decorator).decode( bb.array() );
             fail( "we should not get there" );
         }
         catch ( DecoderException de )
@@ -415,11 +415,11 @@ public class SyncRequestValueControlTest
             } );
         bb.flip();
 
-        SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
+        SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
         
         try
         {
-            decorator.decode( bb.array() );
+            ((SyncRequestValueDecorator)decorator).decode( bb.array() );
             fail( "we should not get there" );
         }
         catch ( DecoderException de )

Modified: directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java?rev=1163982&r1=1163981&r2=1163982&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java (original)
+++ directory/shared/trunk/ldap/extras/codec/src/test/java/org/apache/directory/shared/ldap/extras/controls/syncrepl_impl/SyncStateValueControlTest.java Thu Sep  1 10:22:06 2011
@@ -66,9 +66,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)decorator.decode( bb.array() );
+        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.PRESENT, syncStateValue.getSyncStateType() );
         assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
@@ -103,9 +103,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)decorator.decode( bb.array() );
+        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.ADD, syncStateValue.getSyncStateType() );
         assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
@@ -141,9 +141,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)decorator.decode( bb.array() );
+        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.MODIFY, syncStateValue.getSyncStateType() );
         assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );
@@ -185,9 +185,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        decorator.decode( bb.array() );
+        ((SyncStateValueDecorator)decorator).decode( bb.array() );
     }
 
 
@@ -205,9 +205,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        decorator.decode( bb.array() );
+        ((SyncStateValueDecorator)decorator).decode( bb.array() );
     }
 
 
@@ -227,9 +227,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        decorator.decode( bb.array() );
+        ((SyncStateValueDecorator)decorator).decode( bb.array() );
     }
     
     
@@ -252,9 +252,9 @@ public class SyncStateValueControlTest e
             } );
         bb.flip();
 
-        SyncStateValueDecorator decorator = new SyncStateValueDecorator( codec );
+        SyncStateValue decorator = new SyncStateValueDecorator( codec );
 
-        SyncStateValue syncStateValue = (SyncStateValue)decorator.decode( bb.array() );
+        SyncStateValue syncStateValue = (SyncStateValue)((SyncStateValueDecorator)decorator).decode( bb.array() );
 
         assertEquals( SyncStateTypeEnum.MODDN, syncStateValue.getSyncStateType() );
         assertEquals( "abc", Strings.utf8ToString(syncStateValue.getEntryUUID()) );



Mime
View raw message