directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r946342 [2/3] - in /directory/shared/branches/xdbm-refactoring: ./ ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/ ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/ ldap-schema-loader/src/main...
Date Wed, 19 May 2010 19:03:54 GMT
Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java Wed May 19 19:03:51 2010
@@ -25,6 +25,7 @@ import java.util.Arrays;
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractResultResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
 
+
 /**
  * Lockable ExtendedResponse implementation
  * 
@@ -81,7 +82,7 @@ public class ExtendedResponseImpl extend
             return null;
         }
 
-        final byte[] copy = new byte[ value.length ];
+        final byte[] copy = new byte[value.length];
         System.arraycopy( value, 0, copy, 0, value.length );
         return copy;
     }
@@ -97,14 +98,16 @@ public class ExtendedResponseImpl extend
     {
         if ( value != null )
         {
-            this.value = new byte[ value.length ];
+            this.value = new byte[value.length];
             System.arraycopy( value, 0, this.value, 0, value.length );
-        } else {
+        }
+        else
+        {
             this.value = null;
         }
     }
-    
-    
+
+
     public void setOid( String oid )
     {
         this.oid = oid;
@@ -137,6 +140,27 @@ public class ExtendedResponseImpl extend
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( oid != null )
+        {
+            hash = hash * 17 + oid.hashCode();
+        }
+        if ( value != null )
+        {
+            hash = hash * 17 + Arrays.hashCode( value );
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object equals this ExtendedRequest.
      * 
      * @param obj
@@ -154,7 +178,7 @@ public class ExtendedResponseImpl extend
         {
             return false;
         }
-        
+
         if ( !( obj instanceof InternalExtendedResponse ) )
         {
             return false;
@@ -172,12 +196,9 @@ public class ExtendedResponseImpl extend
             return false;
         }
 
-        if ( oid != null && resp.getResponseName() != null )
+        if ( oid != null && resp.getResponseName() != null && !oid.equals( resp.getResponseName() ) )
         {
-            if ( !oid.equals( resp.getResponseName() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( value != null && resp.getResponse() == null )
@@ -190,12 +211,9 @@ public class ExtendedResponseImpl extend
             return false;
         }
 
-        if ( value != null && resp.getResponse() != null )
+        if ( value != null && resp.getResponse() != null && !Arrays.equals( value, resp.getResponse() ) )
         {
-            if ( !Arrays.equals( value, resp.getResponse() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         return true;

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java Wed May 19 19:03:51 2010
@@ -25,6 +25,7 @@ import java.util.Arrays;
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractResultResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalIntermediateResponse;
 
+
 /**
  * IntermediateResponse implementation
  * 
@@ -67,7 +68,7 @@ public class IntermediateResponseImpl ex
             return null;
         }
 
-        final byte[] copy = new byte[ value.length ];
+        final byte[] copy = new byte[value.length];
         System.arraycopy( value, 0, copy, 0, value.length );
         return copy;
     }
@@ -82,14 +83,16 @@ public class IntermediateResponseImpl ex
     {
         if ( value != null )
         {
-            this.value = new byte[ value.length ];
+            this.value = new byte[value.length];
             System.arraycopy( value, 0, this.value, 0, value.length );
-        } else {
+        }
+        else
+        {
             this.value = null;
         }
     }
-    
-    
+
+
     /**
      * Gets the OID uniquely identifying this Intemediate response (a.k.a. its
      * name).
@@ -115,6 +118,27 @@ public class IntermediateResponseImpl ex
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( oid != null )
+        {
+            hash = hash * 17 + oid.hashCode();
+        }
+        if ( value != null )
+        {
+            hash = hash * 17 + Arrays.hashCode( value );
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object equals this IntemediateResponse.
      * 
      * @param obj the object to be checked for equality
@@ -131,7 +155,7 @@ public class IntermediateResponseImpl ex
         {
             return false;
         }
-        
+
         if ( !( obj instanceof InternalIntermediateResponse ) )
         {
             return false;
@@ -149,12 +173,9 @@ public class IntermediateResponseImpl ex
             return false;
         }
 
-        if ( ( oid != null ) && ( resp.getResponseName() != null ) )
+        if ( ( oid != null ) && ( resp.getResponseName() != null ) && !oid.equals( resp.getResponseName() ) )
         {
-            if ( !oid.equals( resp.getResponseName() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( ( value != null ) && ( resp.getResponseValue() == null ) )
@@ -167,12 +188,10 @@ public class IntermediateResponseImpl ex
             return false;
         }
 
-        if ( ( value != null ) && ( resp.getResponseValue() != null ) )
+        if ( ( value != null ) && ( resp.getResponseValue() != null )
+            && !Arrays.equals( value, resp.getResponseValue() ) )
         {
-            if ( !Arrays.equals( value, resp.getResponseValue() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         return true;

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java Wed May 19 19:03:51 2010
@@ -20,6 +20,7 @@
 
 package org.apache.directory.shared.ldap.message;
 
+
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 import org.apache.directory.shared.ldap.name.DN;
@@ -176,6 +177,31 @@ public class LdapResultImpl implements I
 
 
     /**
+     * @see Object#hashCode()
+     * @return the instance's hash code 
+     */
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( referral != null )
+        {
+            hash = hash * 17 + referral.hashCode();
+        }
+        hash = hash * 17 + resultCode.hashCode();
+        if ( errorMessage != null )
+        {
+            hash = hash * 17 + errorMessage.hashCode();
+        }
+        if ( matchedDn != null )
+        {
+            hash = hash * 17 + matchedDn.hashCode();
+        }
+
+        return hash;
+    }
+
+
+    /**
      * @param obj The object to compare with
      * @return <code>true</code> if both objects are equals
      */
@@ -206,12 +232,9 @@ public class LdapResultImpl implements I
             return false;
         }
 
-        if ( referral != null && result.getReferral() != null )
+        if ( referral != null && result.getReferral() != null && !referral.equals( result.getReferral() ) )
         {
-            if ( !referral.equals( result.getReferral() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( !resultCode.equals( result.getResultCode() ) )
@@ -270,241 +293,241 @@ public class LdapResultImpl implements I
         switch ( resultCode )
         {
 
-            case SUCCESS :
+            case SUCCESS:
                 sb.append( " success\n" );
                 break;
 
-            case OPERATIONS_ERROR :
+            case OPERATIONS_ERROR:
                 sb.append( " operationsError\n" );
                 break;
 
-            case PROTOCOL_ERROR :
+            case PROTOCOL_ERROR:
                 sb.append( " protocolError\n" );
                 break;
 
-            case TIME_LIMIT_EXCEEDED :
+            case TIME_LIMIT_EXCEEDED:
                 sb.append( " timeLimitExceeded\n" );
                 break;
 
-            case SIZE_LIMIT_EXCEEDED :
+            case SIZE_LIMIT_EXCEEDED:
                 sb.append( " sizeLimitExceeded\n" );
                 break;
 
-            case COMPARE_FALSE :
+            case COMPARE_FALSE:
                 sb.append( " compareFalse\n" );
                 break;
 
-            case COMPARE_TRUE :
+            case COMPARE_TRUE:
                 sb.append( " compareTrue\n" );
                 break;
 
-            case AUTH_METHOD_NOT_SUPPORTED :
+            case AUTH_METHOD_NOT_SUPPORTED:
                 sb.append( " authMethodNotSupported\n" );
                 break;
 
-            case STRONG_AUTH_REQUIRED :
+            case STRONG_AUTH_REQUIRED:
                 sb.append( " strongAuthRequired\n" );
                 break;
 
-            case REFERRAL :
+            case REFERRAL:
                 sb.append( " referral -- new\n" );
                 break;
 
-            case ADMIN_LIMIT_EXCEEDED :
+            case ADMIN_LIMIT_EXCEEDED:
                 sb.append( " adminLimitExceeded -- new\n" );
                 break;
 
-            case UNAVAILABLE_CRITICAL_EXTENSION :
+            case UNAVAILABLE_CRITICAL_EXTENSION:
                 sb.append( " unavailableCriticalExtension -- new\n" );
                 break;
 
-            case CONFIDENTIALITY_REQUIRED :
+            case CONFIDENTIALITY_REQUIRED:
                 sb.append( " confidentialityRequired -- new\n" );
                 break;
 
-            case SASL_BIND_IN_PROGRESS :
+            case SASL_BIND_IN_PROGRESS:
                 sb.append( " saslBindInProgress -- new\n" );
                 break;
 
-            case NO_SUCH_ATTRIBUTE :
+            case NO_SUCH_ATTRIBUTE:
                 sb.append( " noSuchAttribute\n" );
                 break;
 
-            case UNDEFINED_ATTRIBUTE_TYPE :
+            case UNDEFINED_ATTRIBUTE_TYPE:
                 sb.append( " undefinedAttributeType\n" );
                 break;
 
-            case INAPPROPRIATE_MATCHING :
+            case INAPPROPRIATE_MATCHING:
                 sb.append( " inappropriateMatching\n" );
                 break;
 
-            case CONSTRAINT_VIOLATION :
+            case CONSTRAINT_VIOLATION:
                 sb.append( " constraintViolation\n" );
                 break;
 
-            case ATTRIBUTE_OR_VALUE_EXISTS :
+            case ATTRIBUTE_OR_VALUE_EXISTS:
                 sb.append( " attributeOrValueExists\n" );
                 break;
 
-            case INVALID_ATTRIBUTE_SYNTAX :
+            case INVALID_ATTRIBUTE_SYNTAX:
                 sb.append( " invalidAttributeSyntax\n" );
                 break;
 
-            case NO_SUCH_OBJECT :
+            case NO_SUCH_OBJECT:
                 sb.append( " noSuchObject\n" );
                 break;
 
-            case ALIAS_PROBLEM :
+            case ALIAS_PROBLEM:
                 sb.append( " aliasProblem\n" );
                 break;
 
-            case INVALID_DN_SYNTAX :
+            case INVALID_DN_SYNTAX:
                 sb.append( " invalidDNSyntax\n" );
                 break;
 
-            case ALIAS_DEREFERENCING_PROBLEM :
+            case ALIAS_DEREFERENCING_PROBLEM:
                 sb.append( " aliasDereferencingProblem\n" );
                 break;
 
-            case INAPPROPRIATE_AUTHENTICATION :
+            case INAPPROPRIATE_AUTHENTICATION:
                 sb.append( " inappropriateAuthentication\n" );
                 break;
 
-            case INVALID_CREDENTIALS :
+            case INVALID_CREDENTIALS:
                 sb.append( " invalidCredentials\n" );
                 break;
 
-            case INSUFFICIENT_ACCESS_RIGHTS :
+            case INSUFFICIENT_ACCESS_RIGHTS:
                 sb.append( " insufficientAccessRights\n" );
                 break;
 
-            case BUSY :
+            case BUSY:
                 sb.append( " busy\n" );
                 break;
 
-            case UNAVAILABLE :
+            case UNAVAILABLE:
                 sb.append( " unavailable\n" );
                 break;
 
-            case UNWILLING_TO_PERFORM :
+            case UNWILLING_TO_PERFORM:
                 sb.append( " unwillingToPerform\n" );
                 break;
 
-            case LOOP_DETECT :
+            case LOOP_DETECT:
                 sb.append( " loopDetect\n" );
                 break;
 
-            case NAMING_VIOLATION :
+            case NAMING_VIOLATION:
                 sb.append( " namingViolation\n" );
                 break;
 
-            case OBJECT_CLASS_VIOLATION :
+            case OBJECT_CLASS_VIOLATION:
                 sb.append( " objectClassViolation\n" );
                 break;
 
-            case NOT_ALLOWED_ON_NON_LEAF :
+            case NOT_ALLOWED_ON_NON_LEAF:
                 sb.append( " notAllowedOnNonLeaf\n" );
                 break;
 
-            case NOT_ALLOWED_ON_RDN :
+            case NOT_ALLOWED_ON_RDN:
                 sb.append( " notAllowedOnRDN\n" );
                 break;
 
-            case ENTRY_ALREADY_EXISTS :
+            case ENTRY_ALREADY_EXISTS:
                 sb.append( " entryAlreadyExists\n" );
                 break;
 
-            case OBJECT_CLASS_MODS_PROHIBITED :
+            case OBJECT_CLASS_MODS_PROHIBITED:
                 sb.append( " objectClassModsProhibited\n" );
                 break;
 
-            case AFFECTS_MULTIPLE_DSAS :
+            case AFFECTS_MULTIPLE_DSAS:
                 sb.append( " affectsMultipleDSAs -- new\n" );
                 break;
 
-            case OTHER :
+            case OTHER:
                 sb.append( " other\n" );
                 break;
-                
-            default :
+
+            default:
                 switch ( resultCode.getResultCode() )
                 {
-                    case 9 :
+                    case 9:
                         sb.append( " -- 9 reserved --\n" );
                         break;
-                        
-                    case 22 :
+
+                    case 22:
                     case 23:
-                    case 24 :
-                    case 25 :
-                    case 26 :
-                    case 27 :
-                    case 28 :
-                    case 29 :
-                    case 30 :
-                    case 31 :
+                    case 24:
+                    case 25:
+                    case 26:
+                    case 27:
+                    case 28:
+                    case 29:
+                    case 30:
+                    case 31:
                         sb.append( " -- 22-31 unused --\n" );
                         break;
 
-                    case 35 :
+                    case 35:
                         sb.append( " -- 35 reserved for undefined isLeaf --\n" );
                         break;
-                                
-                    case 37 :
-                    case 38 :
-                    case 39 :
-                    case 40 :
-                    case 41 :
-                    case 42 :
-                    case 43 :
-                    case 44 :
-                    case 45 :
-                    case 46 :
-                    case 47 :
+
+                    case 37:
+                    case 38:
+                    case 39:
+                    case 40:
+                    case 41:
+                    case 42:
+                    case 43:
+                    case 44:
+                    case 45:
+                    case 46:
+                    case 47:
                         sb.append( " -- 37-47 unused --\n" );
                         break;
 
-                    case 55 :
-                    case 56 :
-                    case 57 :
-                    case 58 :
-                    case 59 :
-                    case 60 :
-                    case 61 :
-                    case 62 :
-                    case 63 :
+                    case 55:
+                    case 56:
+                    case 57:
+                    case 58:
+                    case 59:
+                    case 60:
+                    case 61:
+                    case 62:
+                    case 63:
                         sb.append( " -- 55-63 unused --\n" );
                         break;
 
-                    case 70 :
+                    case 70:
                         sb.append( " -- 70 reserved for CLDAP --\n" );
                         break;
 
-                    case 72 :
-                    case 73 :
-                    case 74 :
-                    case 75 :
-                    case 76 :
-                    case 77 :
-                    case 78 :
-                    case 79 :
+                    case 72:
+                    case 73:
+                    case 74:
+                    case 75:
+                    case 76:
+                    case 77:
+                    case 78:
+                    case 79:
                         sb.append( " -- 72-79 unused --\n" );
                         break;
 
-                    case 81 :
-                    case 82 :
-                    case 83 :
-                    case 84 :
-                    case 85 :
-                    case 86 :
-                    case 87 :
-                    case 88 :
-                    case 89 :
-                    case 90 :
+                    case 81:
+                    case 82:
+                    case 83:
+                    case 84:
+                    case 85:
+                    case 86:
+                    case 87:
+                    case 88:
+                    case 89:
+                    case 90:
                         sb.append( " -- 81-90 reserved for APIs --" );
                         break;
-                        
-                    default :
+
+                    default:
                         sb.append( "Unknown error code : " ).append( resultCode );
                         break;
                 }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
@@ -63,7 +64,7 @@ public class ModifyDnRequestImpl extends
      * @param id
      *            the seq id of this message
      */
-    public ModifyDnRequestImpl(final int id)
+    public ModifyDnRequestImpl( final int id )
     {
         super( id, TYPE );
     }
@@ -232,6 +233,33 @@ public class ModifyDnRequestImpl extends
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( name != null )
+        {
+            hash = hash * 17 + name.hashCode();
+        }
+        hash = hash * 17 + ( deleteOldRdn ? 0 : 1 );
+
+        if ( newRdn != null )
+        {
+            hash = hash * 17 + newRdn.hashCode();
+        }
+        if ( newSuperior != null )
+        {
+            hash = hash * 17 + newSuperior.hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see of an object equals this ModifyDnRequest stub. The equality
      * presumes all ModifyDnRequest specific properties are the same.
      * 
@@ -263,12 +291,9 @@ public class ModifyDnRequestImpl extends
             return false;
         }
 
-        if ( name != null && req.getName() != null )
+        if ( name != null && req.getName() != null && !name.equals( req.getName() ) )
         {
-            if ( !name.equals( req.getName() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( deleteOldRdn != req.getDeleteOldRdn() )
@@ -286,12 +311,9 @@ public class ModifyDnRequestImpl extends
             return false;
         }
 
-        if ( newRdn != null && req.getNewRdn() != null )
+        if ( newRdn != null && req.getNewRdn() != null && !newRdn.equals( req.getNewRdn() ) )
         {
-            if ( !newRdn.equals( req.getNewRdn() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( newSuperior != null && req.getNewSuperior() == null )
@@ -304,12 +326,9 @@ public class ModifyDnRequestImpl extends
             return false;
         }
 
-        if ( newSuperior != null && req.getNewSuperior() != null )
+        if ( newSuperior != null && req.getNewSuperior() != null && !newSuperior.equals( req.getNewSuperior() ) )
         {
-            if ( !newSuperior.equals( req.getNewSuperior() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         return true;
@@ -328,7 +347,7 @@ public class ModifyDnRequestImpl extends
 
         sb.append( "    ModifyDN Response\n" );
         sb.append( "        Entry : '" ).append( name ).append( "'\n" );
-        if( newRdn != null )
+        if ( newRdn != null )
         {
             sb.append( "        New RDN : '" ).append( newRdn.toString() ).append( "'\n" );
         }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java Wed May 19 19:03:51 2010
@@ -21,6 +21,7 @@ package org.apache.directory.shared.ldap
 
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
@@ -33,8 +34,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.DN;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -47,9 +46,6 @@ public class ModifyRequestImpl extends A
 {
     static final long serialVersionUID = -505803669028990304L;
 
-    /** The logger */
-    private static final transient Logger LOG = LoggerFactory.getLogger( ModifyRequestImpl.class );
-
     /** Dn of the entry to modify or PDU's <b>object</b> field */
     private DN name;
 
@@ -70,7 +66,7 @@ public class ModifyRequestImpl extends A
      * @param id
      *            the sequential message identifier
      */
-    public ModifyRequestImpl(final int id)
+    public ModifyRequestImpl( final int id )
     {
         super( id, TYPE );
     }
@@ -173,6 +169,28 @@ public class ModifyRequestImpl extends A
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( name != null )
+        {
+            hash = hash * 17 + name.hashCode();
+        }
+        hash = hash * 17 + mods.size();
+        for ( int i = 0; i < mods.size(); i++ )
+        {
+            hash = hash * 17 + ( ( DefaultModification ) mods.get( i ) ).hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if ModifyRequest stub equals another by factoring in checks
      * for the name and modification items of the request.
      * 
@@ -204,12 +222,9 @@ public class ModifyRequestImpl extends A
             return false;
         }
 
-        if ( name != null && req.getName() != null )
+        if ( name != null && req.getName() != null && !name.equals( req.getName() ) )
         {
-            if ( !name.equals( req.getName() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( req.getModificationItems().size() != mods.size() )
@@ -231,8 +246,8 @@ public class ModifyRequestImpl extends A
                 }
             }
             else
-                
-            if ( !item.equals((DefaultModification) mods.get( i ) ) )
+
+            if ( !item.equals( ( DefaultModification ) mods.get( i ) ) )
             {
                 return false;
             }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ReferralImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ReferralImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ReferralImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ReferralImpl.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -28,7 +29,6 @@ import java.util.List;
 import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 
 
-
 /**
  * A Referral implementation. For the time being this implementation uses a
  * String representation for LDAPURLs. In the future an LdapUrl interface with
@@ -85,6 +85,25 @@ public class ReferralImpl implements Int
 
 
     /**
+     * @see Object#hashCode()
+     * @return the instance's hash code 
+     */
+    public int hashCode()
+    {
+        int hash = 37;
+        hash = hash * 17 + urls.size();
+
+        // Order doesn't matter, so just add the url hashCode
+        for ( String url : urls )
+        {
+            hash = hash + url.hashCode();
+        }
+
+        return hash;
+    }
+
+
+    /**
      * Compares this Referral implementation to see if it is the same as
      * another. The classes do not have to be the same implementation to return
      * true. Both this and the compared Referral must have the same entries
@@ -113,7 +132,7 @@ public class ReferralImpl implements Int
             }
 
             Iterator<String> list = urls.iterator();
-            
+
             while ( list.hasNext() )
             {
                 // if one of our urls is not contained in the obj return false

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java Wed May 19 19:03:51 2010
@@ -85,7 +85,7 @@ public class SearchRequestImpl extends A
      * @param id
      *            the sequential message identifier
      */
-    public SearchRequestImpl(final int id)
+    public SearchRequestImpl( final int id )
     {
         super( id, MessageTypeEnum.SEARCH_REQUEST );
     }
@@ -354,6 +354,41 @@ public class SearchRequestImpl extends A
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( baseDn != null )
+        {
+            hash = hash * 17 + baseDn.hashCode();
+        }
+        hash = hash * 17 + aliasDerefMode.hashCode();
+        hash = hash * 17 + scope.hashCode();
+        hash = hash * 17 + Long.valueOf( sizeLimit ).hashCode();
+        hash = hash * 17 + timeLimit;
+        hash = hash * 17 + ( typesOnly ? 0 : 1 );
+        if ( attributes != null )
+        {
+            hash = hash * 17 + attributes.size();
+
+            // Order doesn't matter, thus just add hashCode
+            for ( String attr : attributes )
+            {
+                hash = hash + attr.hashCode();
+            }
+        }
+        BranchNormalizedVisitor visitor = new BranchNormalizedVisitor();
+        filter.accept( visitor );
+        hash = hash * 17 + filter.toString().hashCode();
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if two search requests are equal. The Lockable properties
      * and the get/set context specific parameters are not consulted to
      * determine equality. The filter expression tree comparison will normalize
@@ -410,20 +445,14 @@ public class SearchRequestImpl extends A
             return false;
         }
 
-        if ( req.getAttributes() == null && attributes != null )
+        if ( req.getAttributes() == null && attributes != null && attributes.size() > 0 )
         {
-            if ( attributes.size() > 0 )
-            {
-                return false;
-            }
+            return false;
         }
 
-        if ( req.getAttributes() != null && attributes == null )
+        if ( req.getAttributes() != null && attributes == null && req.getAttributes().size() > 0 )
         {
-            if ( req.getAttributes().size() > 0 )
-            {
-                return false;
-            }
+            return false;
         }
 
         if ( req.getAttributes() != null && attributes != null )
@@ -434,7 +463,7 @@ public class SearchRequestImpl extends A
             }
 
             Iterator<String> list = attributes.iterator();
-            
+
             while ( list.hasNext() )
             {
                 if ( !req.getAttributes().contains( list.next() ) )
@@ -454,25 +483,26 @@ public class SearchRequestImpl extends A
         return myFilterString.equals( reqFilterString );
     }
 
+
     /**
      * Return a string the represent a SearchRequest
      */
     public String toString()
     {
-        StringBuilder    sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder();
 
         sb.append( "    SearchRequest\n" );
         sb.append( "        baseDn : '" ).append( baseDn ).append( "'\n" );
-        
+
         if ( filter != null )
         {
             sb.append( "        filter : '" );
             sb.append( filter.toString() );
             sb.append( "'\n" );
         }
-        
+
         sb.append( "        scope : " );
-        
+
         switch ( scope )
         {
             case OBJECT:
@@ -487,9 +517,9 @@ public class SearchRequestImpl extends A
                 sb.append( "whole subtree" );
                 break;
         }
-        
+
         sb.append( '\n' );
-        
+
         sb.append( "        typesOnly : " ).append( typesOnly ).append( '\n' );
 
         sb.append( "        Size Limit : " );
@@ -542,12 +572,12 @@ public class SearchRequestImpl extends A
         sb.append( '\n' );
         sb.append( "        attributes : " );
 
-        boolean         isFirst = true;
+        boolean isFirst = true;
 
         if ( attributes != null )
         {
             Iterator<String> it = attributes.iterator();
-            
+
             while ( it.hasNext() )
             {
                 if ( isFirst )
@@ -558,10 +588,10 @@ public class SearchRequestImpl extends A
                 {
                     sb.append( ", " );
                 }
-                
+
                 sb.append( '\'' ).append( it.next() ).append( '\'' );
             }
-            
+
         }
 
         sb.append( '\n' );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImpl.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractResultResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseDone;
@@ -47,13 +48,27 @@ public class SearchResponseDoneImpl exte
      * @param id
      *            the session unique message id
      */
-    public SearchResponseDoneImpl(final int id)
+    public SearchResponseDoneImpl( final int id )
     {
         super( id, TYPE );
     }
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        hash = hash * 17 + getLdapResult().hashCode();
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks for equality by using the underlying LdapResult objects of this
      * SearchResponseDone stub.
      * 

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java Wed May 19 19:03:51 2010
@@ -109,6 +109,23 @@ public class SearchResponseEntryImpl ext
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( entry != null )
+        {
+            hash = hash * 17 + entry.hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks for equality by comparing the objectName, and attributes
      * properties of this Message after delegating to the super.equals() method.
      * 
@@ -132,7 +149,7 @@ public class SearchResponseEntryImpl ext
         {
             return false;
         }
-        
+
         InternalSearchResponseEntry resp = ( InternalSearchResponseEntry ) obj;
 
         return entry.equals( resp.getEntry() );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImpl.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseReference;
@@ -49,7 +50,7 @@ public class SearchResponseReferenceImpl
      * @param id
      *            the session unique message id
      */
-    public SearchResponseReferenceImpl(final int id)
+    public SearchResponseReferenceImpl( final int id )
     {
         super( id, TYPE );
     }
@@ -83,6 +84,23 @@ public class SearchResponseReferenceImpl
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( this.referral != null )
+        {
+            hash = hash * 17 + this.referral.hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object is equal to this SearchResponseReference stub.
      * 
      * @param obj
@@ -113,12 +131,9 @@ public class SearchResponseReferenceImpl
             return false;
         }
 
-        if ( this.referral != null && resp.getReferral() != null )
+        if ( this.referral != null && resp.getReferral() != null && !this.referral.equals( resp.getReferral() ) )
         {
-            if ( !this.referral.equals( resp.getReferral() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         return true;

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java Wed May 19 19:03:51 2010
@@ -61,6 +61,7 @@ public class CancelRequest extends Exten
     /** The requestName for this extended request */
     public static final String EXTENSION_OID = "1.3.6.1.1.8";
 
+
     /**
      * 
      * Creates a new instance of CancelRequest.
@@ -72,11 +73,11 @@ public class CancelRequest extends Exten
     {
         super( messageId );
         setOid( EXTENSION_OID );
-        
+
         this.cancelId = cancelId;
     }
 
-    
+
     /**
      * Encode the request
      */
@@ -87,7 +88,8 @@ public class CancelRequest extends Exten
 
         payload = cancel.encode().array();
     }
-    
+
+
     /**
      * Gets the extended request's <b>requestValue</b> portion of the PDU. The
      * form of the data is request specific and is determined by the extended
@@ -109,7 +111,7 @@ public class CancelRequest extends Exten
                 throw new RuntimeException( e );
             }
         }
-        
+
         return super.getPayload();
     }
 
@@ -119,19 +121,21 @@ public class CancelRequest extends Exten
      * 
      * @param payload byte array of data encapsulating ext. req. parameters
      */
-    public void setPayload( byte[] payload ) 
+    public void setPayload( byte[] payload )
     {
         CancelDecoder decoder = new CancelDecoder();
-        
+
         try
         {
             Cancel cancel = ( Cancel ) decoder.decode( payload );
 
             if ( payload != null )
             {
-                this.payload = new byte[ payload.length ];
+                this.payload = new byte[payload.length];
                 System.arraycopy( payload, 0, this.payload, 0, payload.length );
-            } else {
+            }
+            else
+            {
                 this.payload = null;
             }
             this.cancelId = cancel.getCancelId();
@@ -167,4 +171,3 @@ public class CancelRequest extends Exten
         return response;
     }
 }
-

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java Wed May 19 19:03:51 2010
@@ -19,10 +19,13 @@
  */
 package org.apache.directory.shared.ldap.message.extended;
 
+
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+
+
 /**
  * 
  * The response sent back from the server after the Cancel extended operation is performed.
@@ -35,6 +38,7 @@ public class CancelResponse extends Exte
     /** The serial version UUID */
     private static final long serialVersionUID = 1L;
 
+
     /**
      * Create a new CancelResponse object
      * @param messageId The messageId
@@ -46,18 +50,18 @@ public class CancelResponse extends Exte
 
         switch ( rcode )
         {
-            case SUCCESS :
+            case SUCCESS:
             case CANCELED:
-            case CANNOT_CANCEL :
-            case NO_SUCH_OPERATION :
-            case TOO_LATE :
+            case CANNOT_CANCEL:
+            case NO_SUCH_OPERATION:
+            case TOO_LATE:
                 break;
-            
+
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04166, ResultCodeEnum.SUCCESS,
-                		ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
+                    ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
         }
-        
+
         super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java Wed May 19 19:03:51 2010
@@ -53,6 +53,7 @@ public class CertGenerationRequest exten
 
     public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.8";
 
+
     /**
      * 
      * Creates a new instance of CertGenerationRequest.
@@ -67,7 +68,7 @@ public class CertGenerationRequest exten
     {
         super( messageId );
         setOid( EXTENSION_OID );
-        
+
         this.certGenObj = new CertGenerationObject();
         certGenObj.setTargetDN( targerDN );
         certGenObj.setIssuerDN( issuerDN );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java Wed May 19 19:03:51 2010
@@ -19,10 +19,13 @@
  */
 package org.apache.directory.shared.ldap.message.extended;
 
+
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.ExtendedResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+
+
 /**
  * 
  * The response sent back from the server after the CertGeneration extended operation is performed.
@@ -34,32 +37,33 @@ public class CertGenerationResponse exte
 {
     /** The serial version UUID */
     private static final long serialVersionUID = 1L;
-    
+
     /** The CertGenerationResponse OID */
     public static final String EXTENSION_OID = "1.3.6.1.4.1.18060.0.1.9";
 
-    public CertGenerationResponse(int messageId, ResultCodeEnum rcode)
+
+    public CertGenerationResponse( int messageId, ResultCodeEnum rcode )
     {
         super( messageId, EXTENSION_OID );
 
         switch ( rcode )
         {
-            case SUCCESS :
-            case OPERATIONS_ERROR :
-            case INSUFFICIENT_ACCESS_RIGHTS :
+            case SUCCESS:
+            case OPERATIONS_ERROR:
+            case INSUFFICIENT_ACCESS_RIGHTS:
                 break;
-            
+
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04166, ResultCodeEnum.SUCCESS,
-                		ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
+                    ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
         }
-        
+
         super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 
 
-    public CertGenerationResponse(int messageId)
+    public CertGenerationResponse( int messageId )
     {
         super( messageId, EXTENSION_OID );
         super.getLdapResult().setMatchedDn( null );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java Wed May 19 19:03:51 2010
@@ -68,21 +68,23 @@ public class GracefulDisconnect extends 
     private InternalReferral replicatedContexts = new ReferralImpl();
 
 
-    public GracefulDisconnect(byte[] value) throws DecoderException
+    public GracefulDisconnect( byte[] value ) throws DecoderException
     {
         super( 0, EXTENSION_OID );
         if ( value != null )
         {
-            this.value = new byte[ value.length ];
+            this.value = new byte[value.length];
             System.arraycopy( value, 0, this.value, 0, value.length );
-        } else {
+        }
+        else
+        {
             this.value = null;
         }
         decodeValue();
     }
 
 
-    public GracefulDisconnect(int timeOffline, int delay)
+    public GracefulDisconnect( int timeOffline, int delay )
     {
         super( 0, EXTENSION_OID );
         super.oid = EXTENSION_OID;
@@ -114,7 +116,7 @@ public class GracefulDisconnect extends 
             this.delay = codec.getDelay();
             super.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
             List<LdapURL> contexts = codec.getReplicatedContexts();
-            
+
             for ( int ii = 0; ii < contexts.size(); ii++ )
             {
                 replicatedContexts.addLdapUrl( contexts.get( ii ).toString() );
@@ -134,7 +136,7 @@ public class GracefulDisconnect extends 
         codec.setTimeOffline( this.timeOffline );
         codec.setDelay( this.delay );
         Iterator<String> contexts = this.replicatedContexts.getLdapUrls().iterator();
-        
+
         while ( contexts.hasNext() )
         {
             String urlstr = ( String ) contexts.next();
@@ -179,7 +181,7 @@ public class GracefulDisconnect extends 
             encodeResponse();
         }
 
-        final byte[] copy = new byte[ value.length ];
+        final byte[] copy = new byte[value.length];
         System.arraycopy( value, 0, copy, 0, value.length );
         return copy;
     }
@@ -210,7 +212,7 @@ public class GracefulDisconnect extends 
         this.delay = codec.getDelay();
         this.timeOffline = codec.getTimeOffline();
         List<LdapURL> contexts = codec.getReplicatedContexts();
-        
+
         for ( int ii = 0; ii < contexts.size(); ii++ )
         {
             LdapURL url = contexts.get( ii );
@@ -219,9 +221,11 @@ public class GracefulDisconnect extends 
 
         if ( value != null )
         {
-            this.value = new byte[ value.length ];
+            this.value = new byte[value.length];
             System.arraycopy( value, 0, this.value, 0, value.length );
-        } else {
+        }
+        else
+        {
             this.value = null;
         }
     }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java Wed May 19 19:03:51 2010
@@ -65,13 +65,13 @@ public class GracefulShutdownRequest ext
     private int delay;
 
 
-    public GracefulShutdownRequest(int messageId)
+    public GracefulShutdownRequest( int messageId )
     {
         this( messageId, UNDETERMINED, NOW );
     }
 
 
-    public GracefulShutdownRequest(int messageId, int timeOffline, int delay)
+    public GracefulShutdownRequest( int messageId, int timeOffline, int delay )
     {
         super( messageId );
         setOid( EXTENSION_OID );
@@ -97,9 +97,11 @@ public class GracefulShutdownRequest ext
             GracefulShutdown gs = ( GracefulShutdown ) decoder.decode( payload );
             if ( payload != null )
             {
-                this.payload = new byte[ payload.length ];
+                this.payload = new byte[payload.length];
                 System.arraycopy( payload, 0, this.payload, 0, payload.length );
-            } else {
+            }
+            else
+            {
                 this.payload = null;
             }
             this.timeOffline = gs.getTimeOffline();

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java Wed May 19 19:03:51 2010
@@ -42,32 +42,32 @@ public class GracefulShutdownResponse ex
     private static final byte[] EMPTY_RESPONSE = new byte[0];
 
 
-    public GracefulShutdownResponse(int messageId, ResultCodeEnum rcode)
+    public GracefulShutdownResponse( int messageId, ResultCodeEnum rcode )
     {
         super( messageId, EXTENSION_OID );
 
         switch ( rcode )
         {
-            case SUCCESS :
+            case SUCCESS:
                 break;
-            
-            case OPERATIONS_ERROR :
+
+            case OPERATIONS_ERROR:
                 break;
-            
-            case INSUFFICIENT_ACCESS_RIGHTS :
+
+            case INSUFFICIENT_ACCESS_RIGHTS:
                 break;
-            
+
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04166, ResultCodeEnum.SUCCESS,
-                		ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
+                    ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
         }
-        
+
         super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 
 
-    public GracefulShutdownResponse(int messageId)
+    public GracefulShutdownResponse( int messageId )
     {
         super( messageId, EXTENSION_OID );
         super.getLdapResult().setMatchedDn( null );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiRequest.java Wed May 19 19:03:51 2010
@@ -43,7 +43,7 @@ public class LaunchDiagnosticUiRequest e
     private static final byte[] EMPTY_PAYLOAD = new byte[0];
 
 
-    public LaunchDiagnosticUiRequest(int messageId)
+    public LaunchDiagnosticUiRequest( int messageId )
     {
         super( messageId );
         setOid( EXTENSION_OID );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java Wed May 19 19:03:51 2010
@@ -41,35 +41,35 @@ public class LaunchDiagnosticUiResponse 
     private static final byte[] EMPTY_RESPONSE = new byte[0];
 
 
-    public LaunchDiagnosticUiResponse(int messageId, ResultCodeEnum rcode)
+    public LaunchDiagnosticUiResponse( int messageId, ResultCodeEnum rcode )
     {
         super( messageId, EXTENSION_OID );
 
         switch ( rcode )
         {
-            case SUCCESS :
+            case SUCCESS:
                 break;
-            
-            case OPERATIONS_ERROR :
+
+            case OPERATIONS_ERROR:
                 break;
-            
-            case INSUFFICIENT_ACCESS_RIGHTS :
+
+            case INSUFFICIENT_ACCESS_RIGHTS:
                 break;
-            
+
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04166, ResultCodeEnum.SUCCESS,
                     ResultCodeEnum.OPERATIONS_ERROR, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS ) );
         }
-        
+
         super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
     }
 
 
-    public LaunchDiagnosticUiResponse(int messageId)
+    public LaunchDiagnosticUiResponse( int messageId )
     {
         super( messageId, EXTENSION_OID );
-        super.getLdapResult().setMatchedDn( null);
+        super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
     }
 

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java Wed May 19 19:03:51 2010
@@ -114,7 +114,8 @@ public class NoticeOfDisconnect extends 
 
     public static final NoticeOfDisconnect PROTOCOLERROR = new NoticeOfDisconnect( ResultCodeEnum.PROTOCOL_ERROR );
 
-    public static final NoticeOfDisconnect STRONGAUTHREQUIRED = new NoticeOfDisconnect( ResultCodeEnum.STRONG_AUTH_REQUIRED );
+    public static final NoticeOfDisconnect STRONGAUTHREQUIRED = new NoticeOfDisconnect(
+        ResultCodeEnum.STRONG_AUTH_REQUIRED );
 
 
     private NoticeOfDisconnect( ResultCodeEnum rcode )
@@ -123,20 +124,20 @@ public class NoticeOfDisconnect extends 
 
         switch ( rcode )
         {
-            case UNAVAILABLE :
+            case UNAVAILABLE:
                 break;
-                
-            case PROTOCOL_ERROR :
+
+            case PROTOCOL_ERROR:
                 break;
-                
-            case STRONG_AUTH_REQUIRED :
+
+            case STRONG_AUTH_REQUIRED:
                 break;
-                
+
             default:
                 throw new IllegalArgumentException( I18n.err( I18n.ERR_04166, ResultCodeEnum.UNAVAILABLE,
                     ResultCodeEnum.PROTOCOL_ERROR, ResultCodeEnum.STRONG_AUTH_REQUIRED ) );
         }
-        
+
         super.getLdapResult().setErrorMessage( rcode.toString() + ": The server will disconnect!" );
         super.getLdapResult().setMatchedDn( null );
         super.getLdapResult().setResultCode( rcode );
@@ -147,7 +148,6 @@ public class NoticeOfDisconnect extends 
     // ExtendedResponse Interface Method Implementations
     // ------------------------------------------------------------------------
 
-    
     /**
      * Gets the reponse OID specific encoded response values.
      * 

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.extended;
 
+
 import java.nio.ByteBuffer;
 
 import javax.naming.NamingException;
@@ -52,7 +53,7 @@ public class StoredProcedureRequest exte
 
     private StoredProcedure procedure;
 
-    
+
     public StoredProcedureRequest( int messageId )
     {
         super( messageId );
@@ -81,7 +82,7 @@ public class StoredProcedureRequest exte
     {
         StoredProcedureDecoder decoder = new StoredProcedureDecoder();
         StoredProcedureContainer container = new StoredProcedureContainer();
-        
+
         try
         {
             decoder.decode( ByteBuffer.wrap( payload ), container );
@@ -147,71 +148,70 @@ public class StoredProcedureRequest exte
     // Parameters of the Extended Request Payload
     // -----------------------------------------------------------------------
 
-
     public String getLanguage()
     {
         return procedure.getLanguage();
     }
-    
-    
+
+
     public void setLanguage( String language )
     {
         this.procedure.setLanguage( language );
     }
 
-    
+
     public void setProcedure( String procedure )
     {
         this.procedure.setProcedure( StringTools.getBytesUtf8( procedure ) );
     }
 
-    
+
     public String getProcedureSpecification()
     {
         return StringTools.utf8ToString( procedure.getProcedure() );
     }
-    
-    
+
+
     public int size()
     {
         return this.procedure.getParameters().size();
     }
-    
-    
+
+
     public Object getParameterType( int index )
     {
-        if ( ! this.procedure.getLanguage().equals( "java" ) )
+        if ( !this.procedure.getLanguage().equals( "java" ) )
         {
             return procedure.getParameters().get( index ).getType();
         }
 
         return getJavaParameterType( index );
     }
-    
-    
+
+
     public Class<?> getJavaParameterType( int index )
     {
         throw new NotImplementedException( I18n.err( I18n.ERR_04175 ) );
     }
-    
-    
+
+
     public Object getParameterValue( int index )
     {
-        if ( ! this.procedure.getLanguage().equals( "java" ) )
+        if ( !this.procedure.getLanguage().equals( "java" ) )
         {
             return procedure.getParameters().get( index ).getValue();
         }
 
         return getJavaParameterValue( index );
     }
-    
-    
+
+
     public Object getJavaParameterValue( int index )
     {
         throw new NotImplementedException( I18n.err( I18n.ERR_04176 ) );
     }
-    
-    
+
+
     public void addParameter( Object type, Object value )
     {
         /**
@@ -230,14 +230,14 @@ public class StoredProcedureRequest exte
          * Replacing this code with the one below without the conditional check.
          
          */
-        
+
         StoredProcedureParameter parameter = new StoredProcedureParameter();
         parameter.setType( ( byte[] ) type );
         parameter.setValue( ( byte[] ) value );
         this.procedure.addParameter( parameter );
 
         // below here try to convert parameters to their appropriate byte[] representations
-        
+
         /**
          * FIXME: What is this for?
          * 

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
+
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
@@ -46,7 +47,7 @@ public class InternalAbstractRequest ext
      * @param hasResponse
      *            flag indicating if this request generates a response
      */
-    protected InternalAbstractRequest(final int id, final MessageTypeEnum type, boolean hasResponse)
+    protected InternalAbstractRequest( final int id, final MessageTypeEnum type, boolean hasResponse )
     {
         super( id, type );
 
@@ -64,7 +65,8 @@ public class InternalAbstractRequest ext
     {
         return hasResponse;
     }
-    
+
+
     /**
      * @see Object#hashCode()
      * @return the instance's hash code 
@@ -72,9 +74,9 @@ public class InternalAbstractRequest ext
     public int hashCode()
     {
         int hash = 37;
-        hash = hash*17 + (hasResponse ? 0 : 1 );
-        hash = hash*17 + super.hashCode();
-        
+        hash = hash * 17 + ( hasResponse ? 0 : 1 );
+        hash = hash * 17 + super.hashCode();
+
         return hash;
     }
 }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
+
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 
@@ -48,7 +49,7 @@ public abstract class InternalAbstractRe
      * @param type
      *            the message type of the response
      */
-    protected InternalAbstractResultResponse(final int id, final MessageTypeEnum type)
+    protected InternalAbstractResultResponse( final int id, final MessageTypeEnum type )
     {
         super( id, type );
     }
@@ -110,12 +111,9 @@ public abstract class InternalAbstractRe
             return false;
         }
 
-        if ( getLdapResult() != null && resp.getLdapResult() != null )
+        if ( getLdapResult() != null && resp.getLdapResult() != null && !getLdapResult().equals( resp.getLdapResult() ) )
         {
-            if ( !getLdapResult().equals( resp.getLdapResult() ) )
-            {
-                return false;
-            }
+            return false;
         }
 
         return true;

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java Wed May 19 19:03:51 2010
@@ -153,8 +153,8 @@ public class AVASerializer
     public static AVA deserialize( ObjectInput in ) throws IOException
     {
         String upName = in.readUTF();
-        int start = in.readInt();
-        int length = in.readInt();
+        in.readInt(); // start
+        in.readInt(); // length
         String upType = in.readUTF();
         String normType = in.readUTF();
         

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java Wed May 19 19:03:51 2010
@@ -35,7 +35,6 @@ import org.apache.commons.collections.ma
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.StringValue;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.StringTools;

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java Wed May 19 19:03:51 2010
@@ -529,7 +529,7 @@ public class AttributeType extends Abstr
     /**
      * Check the constraints for the Usage field.
      */
-    private void checkUsage( List<Throwable> errors, Registries registries )
+    private void checkUsage( List<Throwable> errors )
     {
         // Check that the AT usage is the same that its superior
         if ( ( superior != null ) && ( usage != superior.getUsage() ) )
@@ -559,15 +559,12 @@ public class AttributeType extends Abstr
     /**
      * Check the constraints for the Collective field.
      */
-    private void checkCollective( List<Throwable> errors, Registries registries )
+    private void checkCollective( List<Throwable> errors )
     {
-        if ( superior != null )
+        if ( superior != null && superior.isCollective() )
         {
-            if ( superior.isCollective() )
-            {
-                // An AttributeType will be collective if its superior is collective
-                this.isCollective = true;
-            }
+            // An AttributeType will be collective if its superior is collective
+            this.isCollective = true;
         }
 
         if ( isCollective() && ( usage != UsageEnum.USER_APPLICATIONS ) )
@@ -618,10 +615,10 @@ public class AttributeType extends Abstr
             buildSubstring( errors, registries );
 
             // Check the USAGE
-            checkUsage( errors, registries );
+            checkUsage( errors );
 
             // Check the COLLECTIVE element
-            checkCollective( errors, registries );
+            checkCollective( errors );
 
             // Inject the attributeType into the oid/normalizer map
             attributeTypeRegistry.addMappingFor( this );

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java Wed May 19 19:03:51 2010
@@ -207,13 +207,10 @@ public class DITContentRule extends Abst
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !auxObjectClassOids.contains( objectClass.getOid() ) )
         {
-            if ( !auxObjectClassOids.contains( objectClass.getOid() ) )
-            {
-                auxObjectClasses.add( objectClass );
-                auxObjectClassOids.add( objectClass.getOid() );
-            }
+            auxObjectClasses.add( objectClass );
+            auxObjectClassOids.add( objectClass.getOid() );
         }
     }
 
@@ -309,13 +306,10 @@ public class DITContentRule extends Abst
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !mayAttributeTypeOids.contains( attributeType.getOid() ) )
         {
-            if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
-            {
-                mayAttributeTypes.add( attributeType );
-                mayAttributeTypeOids.add( attributeType.getOid() );
-            }
+            mayAttributeTypes.add( attributeType );
+            mayAttributeTypeOids.add( attributeType.getOid() );
         }
     }
 
@@ -413,13 +407,10 @@ public class DITContentRule extends Abst
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !mustAttributeTypeOids.contains( attributeType.getOid() ) )
         {
-            if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
-            {
-                mustAttributeTypes.add( attributeType );
-                mustAttributeTypeOids.add( attributeType.getOid() );
-            }
+            mustAttributeTypes.add( attributeType );
+            mustAttributeTypeOids.add( attributeType.getOid() );
         }
     }
 
@@ -517,13 +508,10 @@ public class DITContentRule extends Abst
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !notAttributeTypeOids.contains( attributeType.getOid() ) )
         {
-            if ( !notAttributeTypeOids.contains( attributeType.getOid() ) )
-            {
-                notAttributeTypes.add( attributeType );
-                notAttributeTypeOids.add( attributeType.getOid() );
-            }
+            notAttributeTypes.add( attributeType );
+            notAttributeTypeOids.add( attributeType.getOid() );
         }
     }
 
@@ -708,6 +696,7 @@ public class DITContentRule extends Abst
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java Wed May 19 19:03:51 2010
@@ -254,6 +254,7 @@ public class DITStructureRule extends Ab
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java Wed May 19 19:03:51 2010
@@ -247,6 +247,7 @@ public class LdapSyntax extends Abstract
      * @param registries The Registries
      * @exception If the Syntx is not valid 
      */
+    @SuppressWarnings("PMD.CollapsibleIfStatements") // Used because of comments
     public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
         if ( registries != null )

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java Wed May 19 19:03:51 2010
@@ -217,12 +217,9 @@ public class MatchingRuleUse extends Abs
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !applicableAttributeOids.contains( oid ) )
         {
-            if ( !applicableAttributeOids.contains( oid ) )
-            {
-                applicableAttributeOids.add( oid );
-            }
+            applicableAttributeOids.add( oid );
         }
     }
 
@@ -239,13 +236,10 @@ public class MatchingRuleUse extends Abs
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !applicableAttributeOids.contains( attributeType.getOid() ) )
         {
-            if ( !applicableAttributeOids.contains( attributeType.getOid() ) )
-            {
-                applicableAttributes.add( attributeType );
-                applicableAttributeOids.add( attributeType.getOid() );
-            }
+            applicableAttributes.add( attributeType );
+            applicableAttributeOids.add( attributeType.getOid() );
         }
     }
 
@@ -288,6 +282,7 @@ public class MatchingRuleUse extends Abs
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java Wed May 19 19:03:51 2010
@@ -342,13 +342,10 @@ public class NameForm extends AbstractSc
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !mustAttributeTypeOids.contains( attributeType.getOid() ) )
         {
-            if ( !mustAttributeTypeOids.contains( attributeType.getOid() ) )
-            {
-                mustAttributeTypes.add( attributeType );
-                mustAttributeTypeOids.add( attributeType.getOid() );
-            }
+            mustAttributeTypes.add( attributeType );
+            mustAttributeTypeOids.add( attributeType.getOid() );
         }
     }
 
@@ -457,13 +454,10 @@ public class NameForm extends AbstractSc
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        if ( !isReadOnly )
+        if ( !isReadOnly && !mayAttributeTypeOids.contains( attributeType.getOid() ) )
         {
-            if ( !mayAttributeTypeOids.contains( attributeType.getOid() ) )
-            {
-                mayAttributeTypes.add( attributeType );
-                mayAttributeTypeOids.add( attributeType.getOid() );
-            }
+            mayAttributeTypes.add( attributeType );
+            mayAttributeTypeOids.add( attributeType.getOid() );
         }
     }
 
@@ -522,6 +516,7 @@ public class NameForm extends AbstractSc
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java Wed May 19 19:03:51 2010
@@ -1105,6 +1105,7 @@ public class SchemaUtils
     /**
      * NOT FULLY IMPLEMENTED!
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public static StringBuffer render( DITStructureRule dsr )
     {
         StringBuffer buf = new StringBuffer();

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DeepTrimToLowerCachingNormalizingComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DeepTrimToLowerCachingNormalizingComparator.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DeepTrimToLowerCachingNormalizingComparator.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DeepTrimToLowerCachingNormalizingComparator.java Wed May 19 19:03:51 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.shared.ldap.schema.comparators;
 
 
-import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.normalizers.CachingNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 
@@ -41,15 +40,4 @@ public class DeepTrimToLowerCachingNorma
         super( oid, new CachingNormalizer( new DeepTrimToLowerNormalizer( oid ), 10 ), 
             new ComparableComparator( oid ) );
     }
-    
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setSchemaManager( SchemaManager schemaManager )
-    {
-        super.setSchemaManager( schemaManager );
-    }
-    
 }

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java Wed May 19 19:03:51 2010
@@ -20,15 +20,12 @@
 package org.apache.directory.shared.ldap.schema.comparators;
 
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-
-import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -41,9 +38,6 @@ import org.slf4j.LoggerFactory;
  */
 public class UniqueMemberComparator extends LdapComparator<String>
 {
-    /** A logger for this class */
-    private static final Logger LOG = LoggerFactory.getLogger( UniqueMemberComparator.class );
-
     /** The serialVersionUID */
     private static final long serialVersionUID = 1L;
 



Mime
View raw message