directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1064237 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec: LdapEncoder.java MessageEncoderException.java decorators/ResponseDecorator.java
Date Thu, 27 Jan 2011 18:12:44 GMT
Author: akarasulu
Date: Thu Jan 27 18:12:44 2011
New Revision: 1064237

URL: http://svn.apache.org/viewvc?rev=1064237&view=rev
Log:
fixing issue with LdapEncoder after rename operation

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/MessageEncoderException.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResponseDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java?rev=1064237&r1=1064236&r2=1064237&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
Thu Jan 27 18:12:44 2011
@@ -316,10 +316,8 @@ public class LdapEncoder
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    private ByteBuffer encodeLdapResult( ByteBuffer buffer, LdapResultDecorator decorator
) throws EncoderException
+    private ByteBuffer encodeLdapResult( ByteBuffer buffer, LdapResultDecorator ldapResult
) throws EncoderException
     {
-        LdapResult ldapResult = decorator.getLdapResult();
-
         if ( buffer == null )
         {
             throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
@@ -338,10 +336,10 @@ public class LdapEncoder
         }
 
         // The matchedDN
-        Value.encode( buffer, decorator.getMatchedDnBytes() );
+        Value.encode( buffer, ldapResult.getMatchedDnBytes() );
 
         // The error message
-        Value.encode( buffer, decorator.getErrorMessageBytes() );
+        Value.encode( buffer, ldapResult.getErrorMessageBytes() );
 
         // The referrals, if any
         Referral referral = ldapResult.getReferral();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/MessageEncoderException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/MessageEncoderException.java?rev=1064237&r1=1064236&r2=1064237&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/MessageEncoderException.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/MessageEncoderException.java
Thu Jan 27 18:12:44 2011
@@ -19,8 +19,10 @@
  */
 package org.apache.directory.shared.ldap.codec;
 
+
 import org.apache.directory.shared.asn1.EncoderException;
 
+
 /**
  * Create an exception containing the messageId
  *
@@ -29,6 +31,8 @@ import org.apache.directory.shared.asn1.
  */
 public class MessageEncoderException extends EncoderException
 {
+    private static final long serialVersionUID = -4634398228257729537L;
+
     /** The message ID */
     private int messageId;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResponseDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResponseDecorator.java?rev=1064237&r1=1064236&r2=1064237&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResponseDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ResponseDecorator.java
Thu Jan 27 18:12:44 2011
@@ -57,6 +57,15 @@ public abstract class ResponseDecorator 
 
 
     /**
+     * @return the ldapResultDecorator as a decorator to reduce casting.
+     */
+    public LdapResultDecorator getLdapResultDecorator()
+    {
+        return ldapResultDecorator;
+    }
+
+
+    /**
      * @param ldapResultDecorator the ldapResultDecorator to set
      */
     public void setLdapResultDecorator( LdapResultDecorator ldapResultDecorator )



Mime
View raw message