directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1063092 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ shared/trunk/ldap/src/main/java/org/apache/directory/shared...
Date Tue, 25 Jan 2011 01:19:29 GMT
Author: akarasulu
Date: Tue Jan 25 01:19:28 2011
New Revision: 1063092

URL: http://svn.apache.org/viewvc?rev=1063092&view=rev
Log:
added encoding decorator to decouple AddResponseImpl

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddResponseDecorator.java
      - copied, changed from r1063087, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java
  (contents, props changed)
      - copied, changed from r1063086, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponseImpl.java
Removed:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponseImpl.java
Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/nod/AddNoDResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
Tue Jan 25 01:19:28 2011
@@ -49,7 +49,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.*;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
Tue Jan 25 01:19:28 2011
@@ -22,8 +22,8 @@ package org.apache.directory.shared.dsml
 
 
 import org.apache.directory.shared.ldap.model.message.AddResponse;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
 import org.dom4j.Element;
 
 

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/Dsmlv2ResponseGrammar.java
Tue Jan 25 01:19:28 2011
@@ -45,7 +45,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.*;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.BindResponse;
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
 import org.apache.directory.shared.ldap.model.message.CompareResponse;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
Tue Jan 25 01:19:28 2011
@@ -73,7 +73,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.*;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.message.BindRequestImpl;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapEncoder.java
Tue Jan 25 01:19:28 2011
@@ -37,6 +37,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.MessageEncoderException;
 import org.apache.directory.shared.ldap.codec.controls.CodecControl;
 import org.apache.directory.shared.ldap.message.decorators.AddRequestDecorator;
+import org.apache.directory.shared.ldap.message.decorators.AddResponseDecorator;
 import org.apache.directory.shared.ldap.message.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.model.entry.BinaryValue;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -476,11 +477,12 @@ public class LdapEncoder
      * 
      * Length(AddResponse) = Length(0x69) + Length(L1) + L1
      */
-    private int computeAddResponseLength( AddResponseImpl addResponse )
+    private int computeAddResponseLength( AddResponseDecorator decorator )
     {
+        AddResponse addResponse = decorator.getAddResponse();
         int addResponseLength = computeLdapResultLength( addResponse.getLdapResult() );
 
-        addResponse.setAddResponseLength( addResponseLength );
+        decorator.setAddResponseLength( addResponseLength );
 
         return 1 + TLV.getNbBytes( addResponseLength ) + addResponseLength;
     }
@@ -1457,13 +1459,15 @@ public class LdapEncoder
      * 
      * @param buffer The buffer where to put the PDU
      */
-    private void encodeAddResponse( ByteBuffer buffer, AddResponseImpl addResponse ) throws
EncoderException
+    private void encodeAddResponse( ByteBuffer buffer, AddResponseDecorator decorator ) throws
EncoderException
     {
+        AddResponse addResponse = decorator.getAddResponse();
+
         try
         {
             // The AddResponse Tag
             buffer.put( LdapConstants.ADD_RESPONSE_TAG );
-            buffer.put( TLV.getBytes( addResponse.getAddResponseLength() ) );
+            buffer.put( TLV.getBytes( decorator.getAddResponseLength() ) );
 
             // The LdapResult
             encodeLdapResult( buffer, addResponse.getLdapResult() );
@@ -2366,7 +2370,7 @@ public class LdapEncoder
                 return computeAddRequestLength( ( AddRequestDecorator ) decorator );
 
             case ADD_RESPONSE:
-                return computeAddResponseLength( ( AddResponseImpl ) message );
+                return computeAddResponseLength( ( AddResponseDecorator ) decorator );
 
             case BIND_REQUEST:
                 return computeBindRequestLength( ( BindRequestImpl ) message );
@@ -2443,7 +2447,7 @@ public class LdapEncoder
                 break;
 
             case ADD_RESPONSE:
-                encodeAddResponse( bb, ( AddResponseImpl ) message );
+                encodeAddResponse( bb, ( AddResponseDecorator ) decorator );
                 break;
 
             case BIND_REQUEST:

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
Tue Jan 25 01:19:28 2011
@@ -25,11 +25,8 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- * Example to show decorator application. The decorator interface is CodecControl which
- * adds the additional functionality. This class would be the concrete decorator for the
- * CodecControl. The decorated component is Control, and an example of a concrete
- * decorated component would be LdifControl.
- * 
+ * Doc me!
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class AddRequestDecorator extends MessageDecorator

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddResponseDecorator.java
(from r1063087, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddResponseDecorator.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddResponseDecorator.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java&r1=1063087&r2=1063092&rev=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/AddResponseDecorator.java
Tue Jan 25 01:19:28 2011
@@ -20,125 +20,52 @@
 package org.apache.directory.shared.ldap.message.decorators;
 
 
-import java.util.List;
-import org.apache.directory.shared.ldap.model.message.AddRequest;
+import org.apache.directory.shared.ldap.model.message.AddResponse;
 
 
 /**
- * Example to show decorator application. The decorator interface is CodecControl which
- * adds the additional functionality. This class would be the concrete decorator for the
- * CodecControl. The decorated component is Control, and an example of a concrete
- * decorated component would be LdifControl.
- * 
+ * Doc me!
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddRequestDecorator extends MessageDecorator
+public class AddResponseDecorator extends MessageDecorator
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
-
-    /** The add request length */
-    private int addRequestLength;
-
-    /** The Entry length */
-    private int entryLength;
-
-    /** The list of all attributes length */
-    private List<Integer> attributesLength;
-
-    /** The list of all vals length */
-    private List<Integer> valuesLength;
+    /** The encoded addResponse length */
+    private int addResponseLength;
 
 
     /**
-     * Makes a AddRequest encodable.
+     * Makes a AddResponse encodable.
      *
-     * @param decoratedMessage the decorated AddRequest
+     * @param decoratedMessage the decorated AddResponse
      */
-    public AddRequestDecorator( AddRequest decoratedMessage )
+    public AddResponseDecorator( AddResponse decoratedMessage)
     {
         super( decoratedMessage );
     }
 
 
-    public AddRequest getAddRequest()
-    {
-        return ( AddRequest ) getMessage();
-    }
-
-
-    /**
-     * Stores the encoded length for the AddRequest
-     * @param addRequestLength The encoded length
-     */
-    public void setAddRequestLength( int addRequestLength )
-    {
-        this.addRequestLength = addRequestLength;
-    }
-
-
-    /**
-     * @return The encoded AddRequest's length
-     */
-    public int getAddRequestLength()
-    {
-        return addRequestLength;
-    }
-
-
-    /**
-     * Stores the encoded length for the Entry
-     * @param entryLength The encoded length
-     */
-    public void setEntryLength( int entryLength )
-    {
-        this.entryLength = entryLength;
-    }
-
-
-    /**
-     * @return The encoded Entry's length
-     */
-    public int getEntryLength()
-    {
-        return entryLength;
-    }
-
-
-    /**
-     * Stores the encoded length for the attributes
-     * @param attributesLength The encoded length
-     */
-    public void setAttributesLength( List<Integer> attributesLength )
-    {
-        this.attributesLength = attributesLength;
-    }
-
-
-    /**
-     * @return The encoded values length
-     */
-    public List<Integer> getAttributesLength()
+    public AddResponse getAddResponse()
     {
-        return attributesLength;
+        return ( AddResponse ) getMessage();
     }
 
 
     /**
-     * Stores the encoded length for the values
-     * @param valuesLength The encoded length
+     * Stores the encoded length for the AddResponse
+     * @param addResponseLength The encoded length
      */
-    public void setValuesLength( List<Integer> valuesLength )
+    public void setAddResponseLength( int addResponseLength )
     {
-        this.valuesLength = valuesLength;
+        this.addResponseLength = addResponseLength;
     }
 
 
     /**
-     * @return The encoded values length
+     * @return The encoded AddResponse's length
      */
-    public List<Integer> getValuesLength()
+    public int getAddResponseLength()
     {
-        return valuesLength;
+        return addResponseLength;
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/decorators/MessageDecorator.java
Tue Jan 25 01:19:28 2011
@@ -22,6 +22,7 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.shared.asn1.EncoderException;
 import org.apache.directory.shared.ldap.model.message.AddRequest;
+import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.message.Message;
 
 
@@ -54,6 +55,8 @@ public class MessageDecorator
                 return new MessageDecorator( decoratedMessage );
             case ADD_REQUEST:
                 return new AddRequestDecorator( ( AddRequest ) decoratedMessage );
+            case ADD_RESPONSE:
+                return new AddResponseDecorator( ( AddResponse ) decoratedMessage );
             default:
                 return new MessageDecorator( decoratedMessage );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/nod/AddNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/nod/AddNoDResponse.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/nod/AddNoDResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/nod/AddNoDResponse.java
Tue Jan 25 01:19:28 2011
@@ -21,7 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddRequestImpl.java
Tue Jan 25 01:19:28 2011
@@ -20,7 +20,6 @@
 package org.apache.directory.shared.ldap.model.message;
 
 
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.model.entry.*;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.entry.Entry;

Copied: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java
(from r1063086, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponseImpl.java)
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java?p2=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java&p1=directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponseImpl.java&r1=1063086&r2=1063092&rev=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponseImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java
Tue Jan 25 01:19:28 2011
@@ -17,12 +17,13 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.shared.ldap.message;
+package org.apache.directory.shared.ldap.model.message;
 
 
 import org.apache.directory.shared.ldap.model.message.AbstractResultResponse;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
 
+
 /**
  * AddResponse implementation.
  * 
@@ -30,13 +31,6 @@ import org.apache.directory.shared.ldap.
  */
 public class AddResponseImpl extends AbstractResultResponse implements AddResponse
 {
-    /** The encoded addResponse length */
-    private int addResponseLength;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
     static final long serialVersionUID = 4027132942339551383L;
 
 
@@ -61,25 +55,6 @@ public class AddResponseImpl extends Abs
 
 
     /**
-     * Stores the encoded length for the AddResponse
-     * @param addResponseLength The encoded length
-     */
-    /* No qualifier*/void setAddResponseLength( int addResponseLength )
-    {
-        this.addResponseLength = addResponseLength;
-    }
-
-
-    /**
-     * @return The encoded AddResponse's length
-     */
-    /* No qualifier */int getAddResponseLength()
-    {
-        return addResponseLength;
-    }
-
-
-    /**
      * Get a String representation of an AddResponse
      * 
      * @return An AddResponse String

Propchange: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/message/AddResponseImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java?rev=1063092&r1=1063091&r2=1063092&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
Tue Jan 25 01:19:28 2011
@@ -43,12 +43,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.message.AddRequest;
-import org.apache.directory.shared.ldap.message.AddResponseImpl;
+import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.AddResponseImpl;
 import org.apache.directory.shared.ldap.message.LdapEncoder;
-import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.Message;
-import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -381,7 +378,7 @@ public class AddRequestTest
             assertTrue( de instanceof ResponseCarryingException );
             Message response = ( ( ResponseCarryingException ) de ).getResponse();
             assertTrue( response instanceof AddResponseImpl );
-            assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ( ( AddResponseImpl ) response
).getLdapResult()
+            assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ( (AddResponseImpl) response
).getLdapResult()
                 .getResultCode() );
             return;
         }



Mime
View raw message