directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r606816 - in /directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap: codec/ codec/extended/operations/ codec/search/controls/ codec/util/ exception/ filter/ message/ name/ trigger/
Date Tue, 25 Dec 2007 21:34:16 GMT
Author: elecharny
Date: Tue Dec 25 13:34:13 2007
New Revision: 606816

URL: http://svn.apache.org/viewvc?rev=606816&view=rev
Log:
Fixed some potential problems and bad code detected by Felix :
- bad hashCode() or equals() methods
- useless interface implementation
- potential NPE

Modified:
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlContainer.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractRequest.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/SearchScope.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureLanguageSchemeOption.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java
    directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/Control.java Tue Dec 25 13:34:13 2007
@@ -265,7 +265,7 @@
         }
 
         // The control type
-        Value.encode( buffer, controlType.getBytes() );
+        Value.encode( buffer, getControlType().getBytes() );
 
         // The control criticality, if true
         if ( criticality )

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessage.java Tue Dec 25 13:34:13 2007
@@ -111,7 +111,14 @@
      */
     public Control getControls( int i )
     {
-        return controls.get( i );
+        if ( controls != null )
+        {
+            return controls.get( i );
+        }
+        else
+        {
+            return null;
+        }
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java Tue Dec 25 13:34:13 2007
@@ -21,7 +21,6 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 
 
@@ -32,7 +31,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapMessageContainer extends AbstractContainer implements IAsn1Container
+public class LdapMessageContainer extends AbstractContainer
 {
     // ~ Instance fields
     // ----------------------------------------------------------------------------

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Tue Dec 25 13:34:13 2007
@@ -116,7 +116,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapMessageGrammar extends AbstractGrammar implements IGrammar
+public class LdapMessageGrammar extends AbstractGrammar
 {
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
@@ -592,12 +592,12 @@
                     }
                     else
                     {
-                        LdapDN dn = LdapDN.EMPTY_LDAPDN;
                         byte[] dnBytes = tlv.getValue().getData();
 
                         try
                         {
-                            dn = new LdapDN( dnBytes );
+                            LdapDN dn = new LdapDN( dnBytes );
+                            bindRequestMessage.setName( dn );
                         }
                         catch ( InvalidNameException ine )
                         {
@@ -610,8 +610,6 @@
                         
                             throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
-
-                        bindRequestMessage.setName( dn );
                     }
 
                     if ( IS_DEBUG )

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectContainer.java Tue Dec 25 13:34:13 2007
@@ -21,7 +21,6 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
@@ -29,7 +28,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulDisconnectContainer extends AbstractContainer implements IAsn1Container
+public class GracefulDisconnectContainer extends AbstractContainer
 {
     /** GracefulShutdown */
     private GracefulDisconnect gracefulDisconnect;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java Tue Dec 25 13:34:13 2007
@@ -59,7 +59,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulDisconnectGrammar extends AbstractGrammar implements IGrammar
+public class GracefulDisconnectGrammar extends AbstractGrammar
 {
     /** The logger */
     static final Logger log = LoggerFactory.getLogger( GracefulDisconnectGrammar.class );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownContainer.java Tue Dec 25 13:34:13 2007
@@ -21,7 +21,6 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
@@ -29,7 +28,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownContainer extends AbstractContainer implements IAsn1Container
+public class GracefulShutdownContainer extends AbstractContainer
 {
     /** GracefulShutdown */
     private GracefulShutdown gracefulShutdown;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java Tue Dec 25 13:34:13 2007
@@ -50,7 +50,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownGrammar extends AbstractGrammar implements IGrammar
+public class GracefulShutdownGrammar extends AbstractGrammar
 {
     /** The logger */
     static final Logger log = LoggerFactory.getLogger( GracefulShutdownGrammar.class );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureContainer.java Tue Dec 25 13:34:13 2007
@@ -22,7 +22,6 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
@@ -30,7 +29,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoredProcedureContainer extends AbstractContainer implements IAsn1Container
+public class StoredProcedureContainer extends AbstractContainer
 {
     // ~ Instance fields
     // ----------------------------------------------------------------------------

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureGrammar.java Tue Dec 25 13:34:13 2007
@@ -40,7 +40,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoredProcedureGrammar extends AbstractGrammar implements IGrammar
+public class StoredProcedureGrammar extends AbstractGrammar
 {
     //~ Static fields/initializers -----------------------------------------------------------------
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlContainer.java Tue Dec 25 13:34:13 2007
@@ -21,13 +21,12 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EntryChangeControlContainer extends AbstractContainer implements IAsn1Container
+public class EntryChangeControlContainer extends AbstractContainer
 {
     /** EntryChangeControl */
     private EntryChangeControlCodec control;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java Tue Dec 25 13:34:13 2007
@@ -44,7 +44,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class EntryChangeControlGrammar extends AbstractGrammar implements IGrammar
+public class EntryChangeControlGrammar extends AbstractGrammar
 {
     /** The logger */
     static final Logger log = LoggerFactory.getLogger( EntryChangeControlGrammar.class );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlContainer.java Tue Dec 25 13:34:13 2007
@@ -21,13 +21,12 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PSearchControlContainer extends AbstractContainer implements IAsn1Container
+public class PSearchControlContainer extends AbstractContainer
 {
     /** PSearchControl */
     private PSearchControlCodec control;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java Tue Dec 25 13:34:13 2007
@@ -57,7 +57,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PSearchControlGrammar extends AbstractGrammar implements IGrammar
+public class PSearchControlGrammar extends AbstractGrammar
 {
     /** The logger */
     static final Logger log = LoggerFactory.getLogger( PSearchControlGrammar.class );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlContainer.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlContainer.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlContainer.java Tue Dec 25 13:34:13 2007
@@ -21,13 +21,12 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
-import org.apache.directory.shared.asn1.ber.IAsn1Container;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SubEntryControlContainer extends AbstractContainer implements IAsn1Container
+public class SubEntryControlContainer extends AbstractContainer
 {
     /** PSearchControl */
     private SubEntryControlCodec control;

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlGrammar.java Tue Dec 25 13:34:13 2007
@@ -42,7 +42,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SubEntryControlGrammar extends AbstractGrammar implements IGrammar
+public class SubEntryControlGrammar extends AbstractGrammar
 {
     /** The logger */
     static final Logger log = LoggerFactory.getLogger( SubEntryControlGrammar.class );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURL.java Tue Dec 25 13:34:13 2007
@@ -330,13 +330,8 @@
 
         string = StringTools.utf8ToString( bytes );
 
-        if ( bytes != null )
-        {
-            this.bytes = new byte[ bytes.length ];
-            System.arraycopy( bytes, 0, this.bytes, 0, bytes.length );
-        } else {
-            this.bytes = null;
-        }
+        this.bytes = new byte[ bytes.length ];
+        System.arraycopy( bytes, 0, this.bytes, 0, bytes.length );
 
         parse( string.toCharArray() );
     }
@@ -676,7 +671,7 @@
     {
         if ( bytes == null )
         {
-            return null;
+            return StringTools.EMPTY_BYTES;
         }
 
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java Tue Dec 25 13:34:13 2007
@@ -116,11 +116,7 @@
         switch ( resultCode )
         {
             case INAPPROPRIATE_AUTHENTICATION :
-                break;
-                
             case CONFIDENTIALITY_REQUIRED :
-                break;
-                
             case AUTH_METHOD_NOT_SUPPORTED :
                 break;
                 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java Tue Dec 25 13:34:13 2007
@@ -60,8 +60,6 @@
         switch ( resultCode )
         {
             case CONSTRAINT_VIOLATION :
-                break;
-                
             case INVALID_ATTRIBUTE_SYNTAX :
                 break;
                 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java Tue Dec 25 13:34:13 2007
@@ -61,15 +61,8 @@
         switch ( resultCode )
         {
             case OBJECT_CLASS_VIOLATION :
-
-                break;
-
             case NOT_ALLOWED_ON_RDN :
-
-                break;
-
             case OBJECT_CLASS_MODS_PROHIBITED :
-
                 break;
 
             default:

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java Tue Dec 25 13:34:13 2007
@@ -42,6 +42,27 @@
     {
     }
 
+    
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        if ( annotations != null )
+        {
+            for ( String key:annotations.keySet() )
+            {
+                Object value = annotations.get( key );
+                
+                h = h*17 + key.hashCode();
+                h = h*17 + ( value == null ? 0 : value.hashCode() );
+            }
+        }
+        
+        return h;
+    }
 
     /**
      * @see org.apache.directory.shared.ldap.filter.ExprNode#get(java.lang.Object)
@@ -71,7 +92,7 @@
         annotations.put( key, value );
     }
 
-
+    
     /**
      * Gets the annotations as a Map.
      * 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java Tue Dec 25 13:34:13 2007
@@ -151,9 +151,9 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + AssertionEnum.AND.hashCode();
-        hash = hash*31 + ( annotations == null ? 0 : annotations.hashCode() );
+        int hash = 37;
+        hash = hash*17 + AssertionEnum.AND.hashCode();
+        hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java Tue Dec 25 13:34:13 2007
@@ -53,6 +53,15 @@
 
 
     /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return super.hashCode();
+    }
+
+    
+    /**
      * @see Object#toString()
      */
     public String toString()

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AssertionNode.java Tue Dec 25 13:34:13 2007
@@ -32,9 +32,6 @@
  */
 public class AssertionNode extends AbstractExprNode
 {
-    /** Setting scan count to max */
-    private static final Long MAX = Long.MAX_VALUE;
-
     /** The assertion or predicate to apply */
     private final Assertion assertion;
 
@@ -75,7 +72,7 @@
          * candidate for use in an enumeration so we set the scan count to the
          * maximum value.
          */
-        set( "count", MAX );
+        set( "count", Long.MAX_VALUE );
     }
 
 
@@ -111,6 +108,21 @@
     public StringBuilder printRefinementToBuffer( StringBuilder buf ) throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException( "AssertionNode can't be part of a refinement" );
+    }
+
+
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        h = h*17 + ( assertion != null ? assertion.hashCode() : 0 );
+        h = h*17 + ( desc != null ? desc.hashCode() : 0 );
+        
+        return h;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/BranchNode.java Tue Dec 25 13:34:13 2007
@@ -175,6 +175,29 @@
         }
     }
     
+    
+    /**
+     * (non-Javadoc)
+     * 
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        
+        if ( children != null )
+        {
+            for ( ExprNode child:children )
+            {
+                h = h*17 + child.hashCode();
+            }
+        }
+        
+        return h;
+    }
+    
     /*
      * (non-Javadoc)
      * 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java Tue Dec 25 13:34:13 2007
@@ -53,6 +53,15 @@
 
 
     /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return super.hashCode();
+    }
+
+    
+    /**
      * @see Object#toString()
      */
     public String toString()

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java Tue Dec 25 13:34:13 2007
@@ -20,6 +20,8 @@
 package org.apache.directory.shared.ldap.filter;
 
 
+import java.util.Arrays;
+
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -165,6 +167,22 @@
     public StringBuilder printRefinementToBuffer( StringBuilder buf ) throws UnsupportedOperationException
     {
         throw new UnsupportedOperationException( "ExtensibleNode can't be part of a refinement" );
+    }
+
+
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        h = h*17 + ( dnAttributes ? 1 : 0 );
+        h = h*17 + matchingRuleId.hashCode();
+        h = h*17 + Arrays.hashCode( value );
+        
+        return h;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java Tue Dec 25 13:34:13 2007
@@ -53,6 +53,15 @@
 
 
     /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return super.hashCode();
+    }
+
+    
+    /**
      * @see Object#toString()
      */
     public String toString()

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java Tue Dec 25 13:34:13 2007
@@ -77,6 +77,20 @@
         this.attribute = attribute;
     }
 
+    
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        h = h*17 + attribute.hashCode();
+        
+        return h;
+    }
+
 
     /*
      * (non-Javadoc)

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java Tue Dec 25 13:34:13 2007
@@ -51,7 +51,16 @@
         super( attribute, value );
     }
 
+    
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return super.hashCode();
+    }
 
+    
     /**
      * @see Object#toString()
      */

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java Tue Dec 25 13:34:13 2007
@@ -201,9 +201,9 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + AssertionEnum.NOT.hashCode();
-        hash = hash*31 + ( annotations == null ? 0 : annotations.hashCode() );
+        int hash = 37;
+        hash = hash*17 + AssertionEnum.NOT.hashCode();
+        hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }
 }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java Tue Dec 25 13:34:13 2007
@@ -153,9 +153,9 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + AssertionEnum.OR.hashCode();
-        hash = hash*31 + ( annotations == null ? 0 : annotations.hashCode() );
+        int hash = 37;
+        hash = hash*17 + AssertionEnum.OR.hashCode();
+        hash = hash*17 + ( annotations == null ? 0 : annotations.hashCode() );
         return hash;
     }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java Tue Dec 25 13:34:13 2007
@@ -132,6 +132,23 @@
         }
     }
     
+
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        h = h*17 + ( aliasDerefAliases != null ? aliasDerefAliases.hashCode() : 0 );
+        h = h*17 + ( baseDn != null ? baseDn.hashCode() : 0 );
+        h = h*17 + scope;
+        
+        return h;
+    }
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java Tue Dec 25 13:34:13 2007
@@ -125,10 +125,10 @@
      */
     public int hashCode()
     {
-    	int h = 31;
-    	h += value.hashCode()*13;
-    	h += getAttribute().hashCode()*13;
-    	h += this.getClass().hashCode()*13;
+    	int h = 37;
+    	
+    	h = h*17 + super.hashCode();
+    	h = h*17 + ( value == null ? 0 : value.hashCode() );
     	
     	return h;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java Tue Dec 25 13:34:13 2007
@@ -39,13 +39,13 @@
  */
 public class SubstringNode extends LeafNode
 {
-    /** The initial fragment before any wildcards */
+    /** The initial fragment before any wildcard */
     private String initialPattern;
 
-    /** The end fragment after wildcards */
+    /** The end fragment after wildcard */
     private String finalPattern;
 
-    /** List of fragments between wildcards */
+    /** List of fragments between wildcard */
     private List<String> anyPattern;
 
     /**
@@ -227,6 +227,30 @@
         }
 
         return StringTools.getRegex( initialStr, null, finalStr );
+    }
+
+
+    /**
+     * @see Object#hashCode()
+     */
+    public int hashCode()
+    {
+        int h = 37;
+        
+        h = h*17 + super.hashCode();
+        h = h*17 + ( initialPattern != null ? initialPattern.hashCode() : 0 );
+        
+        if ( anyPattern != null )
+        {
+            for ( String pattern:anyPattern )
+            {
+                h = h*17 + pattern.hashCode();
+            }
+        }
+        
+        h = h*17 + ( finalPattern != null ? finalPattern.hashCode() : 0 );
+        
+        return h;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java Tue Dec 25 13:34:13 2007
@@ -110,9 +110,9 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + abandonId;
-        hash = hash*31 + super.hashCode();
+        int hash = 37;
+        hash = hash*17 + abandonId;
+        hash = hash*17 + super.hashCode();
         
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractMessage.java Tue Dec 25 13:34:13 2007
@@ -232,11 +232,11 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + id;
-        hash = hash*31 + ( type == null ? 0 : type.hashCode() );
-        hash = hash*31 + ( parameters == null ? 0 : parameters.hashCode() );
-        hash = hash*31 + ( controls == null ? 0 : controls.hashCode() );
+        int hash = 37;
+        hash = hash*17 + id;
+        hash = hash*17 + ( type == null ? 0 : type.hashCode() );
+        hash = hash*17 + ( parameters == null ? 0 : parameters.hashCode() );
+        hash = hash*17 + ( controls == null ? 0 : controls.hashCode() );
         
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractRequest.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractRequest.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractRequest.java Tue Dec 25 13:34:13 2007
@@ -68,9 +68,9 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + (hasResponse ? 0 : 1 );
-        hash = hash*31 + super.hashCode();
+        int hash = 37;
+        hash = hash*17 + (hasResponse ? 0 : 1 );
+        hash = hash*17 + super.hashCode();
         
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java Tue Dec 25 13:34:13 2007
@@ -221,11 +221,11 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + ( attributes == null ? 0 : attributes.hashCode() );
-        hash = hash*31 + ( entry == null ? 0 : entry.hashCode() );
-        hash = hash*31 + ( response == null ? 0 : response.hashCode() );
-        hash = hash*31 + super.hashCode();
+        int hash = 37;
+        hash = hash*17 + ( attributes == null ? 0 : attributes.hashCode() );
+        hash = hash*17 + ( entry == null ? 0 : entry.hashCode() );
+        hash = hash*17 + ( response == null ? 0 : response.hashCode() );
+        hash = hash*17 + super.hashCode();
         
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/AttributeImpl.java Tue Dec 25 13:34:13 2007
@@ -696,9 +696,9 @@
      */
     public int hashCode()
     {
-        int hash = 17;
+        int hash = 37;
         
-        hash += hash*37 + StringTools.toLowerCase( getID() ).hashCode();
+        hash += hash*17 + StringTools.toLowerCase( getID() ).hashCode();
         
         if ( ( list != null ) && ( list.size() != 0 ) )
         {
@@ -706,11 +706,11 @@
             {
                 if ( value instanceof byte[] )
                 {
-                    hash += hash*37 + Arrays.hashCode( (byte[])value );
+                    hash += hash*17 + Arrays.hashCode( (byte[])value );
                 }
                 else 
                 {
-                    hash += hash*37 + value.hashCode();
+                    hash += hash*17 + value.hashCode();
                 }
             }
         }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java Tue Dec 25 13:34:13 2007
@@ -371,14 +371,14 @@
      */
     public int hashCode()
     {
-        int hash = 7;
-        hash = hash*31 + ( credentials == null ? 0 : hCredentials );
-        hash = hash*31 + ( isSimple ? 0 : 1 );
-        hash = hash*31 + ( isVersion3 ? 0 : 1 );
-        hash = hash*31 + ( mechanism == null ? 0 : mechanism.hashCode() );
-        hash = hash*31 + ( name == null ? 0 : name.hashCode() );
-        hash = hash*31 + ( response == null ? 0 : response.hashCode() );
-        hash = hash*31 + super.hashCode();
+        int hash = 37;
+        hash = hash*17 + ( credentials == null ? 0 : hCredentials );
+        hash = hash*17 + ( isSimple ? 0 : 1 );
+        hash = hash*17 + ( isVersion3 ? 0 : 1 );
+        hash = hash*17 + ( mechanism == null ? 0 : mechanism.hashCode() );
+        hash = hash*17 + ( name == null ? 0 : name.hashCode() );
+        hash = hash*17 + ( response == null ? 0 : response.hashCode() );
+        hash = hash*17 + super.hashCode();
         
         return hash;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/AttributeTypeAndValue.java Tue Dec 25 13:34:13 2007
@@ -619,10 +619,10 @@
      */
     public int hashCode()
     {
-        int result = 17;
+        int result = 37;
 
-        result = result * 37 + ( normType != null ? normType.hashCode() : 0 );
-        result = result * 37 + ( value != null ? value.hashCode() : 0 );
+        result = result*17 + ( normType != null ? normType.hashCode() : 0 );
+        result = result*17 + ( value != null ? value.hashCode() : 0 );
 
         return result;
     }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Tue Dec 25 13:34:13 2007
@@ -485,13 +485,13 @@
      */
     public int hashCode()
     {
-        int result = 17;
+        int result = 37;
 
         if ( ( rdns != null ) && ( rdns.size() != 0 ) )
         {
             for ( Rdn rdn : rdns )
             {
-                result = result * 37 + rdn.hashCode();
+                result = result * 17 + rdn.hashCode();
             }
         }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java Tue Dec 25 13:34:13 2007
@@ -1245,7 +1245,7 @@
     */
    public int hashCode()
    {
-       int result = 17;
+       int result = 37;
 
        switch ( nbAtavs )
        {
@@ -1255,7 +1255,7 @@
 
            case 1:
                // We have a single AttributeTypeAndValue
-               result = result * 37 + atav.hashCode();
+               result = result * 17 + atav.hashCode();
                break;
 
            default:
@@ -1263,7 +1263,7 @@
 
                for ( AttributeTypeAndValue ata:atavs )
                {
-                   result = result * 37 + ata.hashCode();
+                   result = result * 17 + ata.hashCode();
                }
        }
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/ActionTime.java Tue Dec 25 13:34:13 2007
@@ -69,10 +69,10 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( name == null ) ? 0 : name.hashCode() );
-        return result;
+        int h = 37;
+        h = h * 17 + ( ( name == null ) ? 0 : name.hashCode() );
+        
+        return h;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/LdapOperation.java Tue Dec 25 13:34:13 2007
@@ -73,10 +73,11 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( name == null ) ? 0 : name.hashCode() );
-        return result;
+        int h = 37;
+
+        h = h*17 + ( ( name == null ) ? 0 : name.hashCode() );
+        
+        return h;
     }
 
 
@@ -86,20 +87,31 @@
     public boolean equals( Object obj )
     {
         if ( this == obj )
+        {
             return true;
-        if ( obj == null )
-            return false;
-        if ( getClass() != obj.getClass() )
+        }
+        
+        if ( ! ( obj  instanceof LdapOperation ) )
+        {
             return false;
+        }
+
         final LdapOperation other = ( LdapOperation ) obj;
+
         if ( name == null )
         {
             if ( other.name != null )
+            {
                 return false;
+            }
+            else
+            { 
+                return true;
+            }
+        }
+        else 
+        {
+            return name.equals( other.name );
         }
-        else if ( !name.equals( other.name ) )
-            return false;
-        return true;
     }
-    
 }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/SearchScope.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/SearchScope.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/SearchScope.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/SearchScope.java Tue Dec 25 13:34:13 2007
@@ -64,10 +64,11 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( name == null ) ? 0 : name.hashCode() );
-        return result;
+        int h = 37;
+        
+        h = h*17 + ( ( name == null ) ? 0 : name.hashCode() );
+        
+        return h;
     }
 
     /* (non-Javadoc)

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureLanguageSchemeOption.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureLanguageSchemeOption.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureLanguageSchemeOption.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureLanguageSchemeOption.java Tue Dec 25 13:34:13 2007
@@ -55,10 +55,11 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( language == null ) ? 0 : language.hashCode() );
-        return result;
+        int h = 37;
+        
+        h = h*17 + ( ( language == null ) ? 0 : language.hashCode() );
+        
+        return h;
     }
 
     /* (non-Javadoc)

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureParameter.java Tue Dec 25 13:34:13 2007
@@ -102,10 +102,11 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( name == null ) ? 0 : name.hashCode() );
-        return result;
+        int h = 37;
+        
+        h = h*17 + ( ( name == null ) ? 0 : name.hashCode() );
+        
+        return h;
     }
 
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/StoredProcedureSearchContextOption.java Tue Dec 25 13:34:13 2007
@@ -67,11 +67,12 @@
      */
     public int hashCode()
     {
-        final int PRIME = 31;
-        int result = 1;
-        result = PRIME * result + ( ( baseObject == null ) ? 0 : baseObject.hashCode() );
-        result = PRIME * result + ( ( searchScope == null ) ? 0 : searchScope.hashCode() );
-        return result;
+        int h = 37;
+        
+        h = h*17 + ( ( baseObject == null ) ? 0 : baseObject.hashCode() );
+        h = h*17 + ( ( searchScope == null ) ? 0 : searchScope.hashCode() );
+        
+        return h;
     }
 
     /* (non-Javadoc)

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java?rev=606816&r1=606815&r2=606816&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/trigger/TriggerSpecification.java Tue Dec 25 13:34:13 2007
@@ -101,12 +101,12 @@
 
 		@Override
 		public int hashCode() {
-			final int PRIME = 31;
-			int result = 1;
-			result = PRIME * result + ((name == null) ? 0 : name.hashCode());
-			result = PRIME * result + ((options == null) ? 0 : options.hashCode());
-			result = PRIME * result + ((parameters == null) ? 0 : parameters.hashCode());
-			return result;
+			int h = 37;
+			
+			h = h*17 + ((name == null) ? 0 : name.hashCode());
+			h = h*17 + ((options == null) ? 0 : options.hashCode());
+			h = h*17 + ((parameters == null) ? 0 : parameters.hashCode());
+			return h;
 		}
 
 		@Override



Mime
View raw message