directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r664290 [6/13] - in /directory/shared/branches/bigbang: ./ asn1/src/main/java/org/apache/directory/shared/asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ asn1/s...
Date Sat, 07 Jun 2008 06:28:15 GMT
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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -29,8 +29,8 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure.StoredProcedureParameter;
+import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,6 +39,7 @@
  * ASN.1 BER Grammar for Stored Procedure Extended Operation
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class StoredProcedureGrammar extends AbstractGrammar
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureStatesEnum.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureStatesEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureStatesEnum.java Fri Jun  6 23:28:06 2008
@@ -29,6 +29,7 @@
  * Constants for StoredProcedureGrammar
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class StoredProcedureStatesEnum implements IStates
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequest.java Fri Jun  6 23:28:06 2008
@@ -20,6 +20,17 @@
 package org.apache.directory.shared.ldap.codec.modify;
 
 
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.DirContext;
+
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
@@ -33,18 +44,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.DirContext;
-
 
 /**
  * A ModifyRequest Message. 
@@ -71,6 +70,7 @@
  * AttributeValue ::= OCTET STRING
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class ModifyRequest extends LdapMessage
 {
@@ -319,19 +319,16 @@
 
         if ( ( modifications != null ) && ( modifications.size() != 0 ) )
         {
-            Iterator<ModificationItemImpl> modificationsIterator = modifications.iterator();
             modificationSequenceLength = new LinkedList<Integer>();
             modificationLength = new LinkedList<Integer>();
             valuesLength = new LinkedList<Integer>();
 
-            while ( modificationsIterator.hasNext() )
+            for ( ModificationItemImpl modification:modifications )
             {
                 // Modification sequence length initialized with the operation
                 int localModificationSequenceLength = 1 + 1 + 1;
                 int localValuesLength = 0;
 
-                ModificationItemImpl modification = modificationsIterator.next();
-
                 // Modification length initialized with the type
                 int typeLength = modification.getAttribute().getID().length();
                 int localModificationLength = 1 + TLV.getNbBytes( typeLength ) + typeLength;
@@ -442,14 +439,11 @@
             // The modifications list
             if ( ( modifications != null ) && ( modifications.size() != 0 ) )
             {
-                Iterator<ModificationItemImpl> modificationIterator = modifications.iterator();
                 int modificationNumber = 0;
 
                 // Compute the modifications length
-                while ( modificationIterator.hasNext() )
+                for ( ModificationItemImpl modification:modifications )
                 {
-                    ModificationItemImpl modification = modificationIterator.next();
-
                     // The modification sequence
                     buffer.put( UniversalTag.SEQUENCE_TAG );
                     int localModificationSequenceLength = modificationSequenceLength

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponse.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponse.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponse.java Fri Jun  6 23:28:06 2008
@@ -35,6 +35,7 @@
  * ModifyResponse ::= [APPLICATION 7] LDAPResult
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class ModifyResponse extends LdapResponse
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequest.java Fri Jun  6 23:28:06 2008
@@ -42,6 +42,7 @@
  *                 newSuperior     [0] LDAPDN OPTIONAL }
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class ModifyDNRequest extends LdapMessage
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponse.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponse.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponse.java Fri Jun  6 23:28:06 2008
@@ -35,6 +35,7 @@
  * ModifyDNResponse ::= [APPLICATION 13] LDAPResult
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class ModifyDNResponse extends LdapResponse
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java Fri Jun  6 23:28:06 2008
@@ -33,6 +33,7 @@
  * And Filter Object to store the And filter.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class AndFilter extends ConnectorFilter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java Fri Jun  6 23:28:06 2008
@@ -37,6 +37,7 @@
  * Object to store the filter. A filter is seen as a tree with a root.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class AttributeValueAssertionFilter extends Filter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java Fri Jun  6 23:28:06 2008
@@ -20,20 +20,20 @@
 package org.apache.directory.shared.ldap.codec.search;
 
 
-import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.asn1.codec.EncoderException;
-
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.codec.EncoderException;
+
 
 /**
  * This Filter abstract class is used to store a set of filters used by
  * OR/AND/NOT filters.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public abstract class ConnectorFilter extends Filter
 {
@@ -109,12 +109,8 @@
 
         if ( ( filterSet != null ) && ( filterSet.size() != 0 ) )
         {
-            Iterator<Filter> filterIterator = filterSet.iterator();
-
-            while ( filterIterator.hasNext() )
+            for ( Filter filter:filterSet )
             {
-                Filter filter = filterIterator.next();
-
                 connectorFilterLength += filter.computeLength();
             }
         }
@@ -142,12 +138,8 @@
         // encode each filter
         if ( ( filterSet != null ) && ( filterSet.size() != 0 ) )
         {
-            Iterator<Filter> filterIterator = filterSet.iterator();
-
-            while ( filterIterator.hasNext() )
+            for ( Filter filter:filterSet )
             {
-                Filter filter = filterIterator.next();
-
                 filter.encode( buffer );
             }
         }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java Fri Jun  6 23:28:06 2008
@@ -34,6 +34,7 @@
  * The search request filter Matching Rule assertion
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class ExtensibleMatchFilter extends Filter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/Filter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/Filter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/Filter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/Filter.java Fri Jun  6 23:28:06 2008
@@ -29,6 +29,7 @@
  * filters.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public abstract class Filter extends AbstractAsn1Object
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java Fri Jun  6 23:28:06 2008
@@ -33,6 +33,7 @@
  * Not Filter Object to store the Not filter.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class NotFilter extends ConnectorFilter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java Fri Jun  6 23:28:06 2008
@@ -33,6 +33,7 @@
  * Or Filter Object to store the Or filter.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class OrFilter extends ConnectorFilter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java Fri Jun  6 23:28:06 2008
@@ -33,6 +33,7 @@
  * Object to store the filter. A filter is seen as a tree with a root.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PresentFilter extends Filter
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java Fri Jun  6 23:28:06 2008
@@ -20,6 +20,14 @@
 package org.apache.directory.shared.ldap.codec.search;
 
 
+import java.io.UnsupportedEncodingException;
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -35,20 +43,13 @@
 import org.apache.directory.shared.ldap.message.ScopeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import java.io.UnsupportedEncodingException;
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-
 
 /**
  * A SearchRequest ldapObject. It's a sub-class of Asn1Object, and it implements
  * the ldapObject class to be seen as a member of the LdapMessage CHOICE.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SearchRequest extends LdapMessage
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDone.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDone.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDone.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDone.java Fri Jun  6 23:28:06 2008
@@ -37,6 +37,7 @@
  * LDAPResult It's a Response, so it inherites from LdapResponse.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SearchResultDone extends LdapResponse
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java Fri Jun  6 23:28:06 2008
@@ -20,6 +20,16 @@
 package org.apache.directory.shared.ldap.codec.search;
 
 
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
@@ -33,16 +43,6 @@
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-
 
 /**
  * A SearchResultEntry Message. Its syntax is :
@@ -63,6 +63,7 @@
  * by one, followed by a searchResultDone message.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SearchResultEntry extends LdapMessage
 {
@@ -228,8 +229,8 @@
      */
     public int computeLength()
     {
-    	objectNameBytes = StringTools.getBytesUtf8( objectName.getUpName() );
-    	
+        objectNameBytes = StringTools.getBytesUtf8( objectName.getUpName() );
+        
         // The entry
         searchResultEntryLength = 1 + TLV.getNbBytes( objectNameBytes.length ) + objectNameBytes.length;
 

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReference.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReference.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReference.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReference.java Fri Jun  6 23:28:06 2008
@@ -20,6 +20,11 @@
 package org.apache.directory.shared.ldap.codec.search;
 
 
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -27,12 +32,6 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 
 /**
  * A SearchResultReference Message. Its syntax is : 
@@ -40,6 +39,7 @@
  * SearchResultReference ::= [APPLICATION 19] SEQUENCE OF LDAPURL
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SearchResultReference extends LdapMessage
 {
@@ -123,12 +123,10 @@
     {
         searchResultReferenceLength = 0;
 
-        Iterator<LdapURL> referencesIterator = searchResultReferences.iterator();
-
         // We may have more than one reference.
-        while ( referencesIterator.hasNext() )
+        for ( LdapURL url:searchResultReferences )
         {
-            int ldapUrlLength = referencesIterator.next().getNbBytes();
+            int ldapUrlLength = url.getNbBytes();
             searchResultReferenceLength += 1 + TLV.getNbBytes( ldapUrlLength ) + ldapUrlLength;
         }
 
@@ -162,13 +160,8 @@
             buffer.put( TLV.getBytes( searchResultReferenceLength ) );
 
             // The references. We must at least have one reference
-            Iterator<LdapURL> referencesIterator = searchResultReferences.iterator();
-
-            // We may have more than one reference.
-            while ( referencesIterator.hasNext() )
+            for ( LdapURL reference:searchResultReferences )
             {
-                LdapURL reference = referencesIterator.next();
-
                 // Encode the reference
                 Value.encode( buffer, reference.getString() );
             }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java Fri Jun  6 23:28:06 2008
@@ -23,7 +23,6 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -49,6 +48,7 @@
  * final = value
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SubstringFilter extends Filter
 {
@@ -247,11 +247,8 @@
 
         if ( anySubstrings != null )
         {
-            Iterator<String> anyIterator = anySubstrings.iterator();
-
-            while ( anyIterator.hasNext() )
+            for ( String any:anySubstrings )
             {
-                String any = anyIterator.next();
                 int anyLength = StringTools.getBytesUtf8( any ).length; 
                 substringsFilterSequenceLength += 1 + TLV.getNbBytes( anyLength ) + anyLength;
             }
@@ -329,11 +326,8 @@
             // The any substrings
             if ( anySubstrings != null )
             {
-                Iterator<String> anyIterator = anySubstrings.iterator();
-
-                while ( anyIterator.hasNext() )
+                for ( String any:anySubstrings )
                 {
-                    String any = anyIterator.next();
                     byte[] anyBytes = StringTools.getBytesUtf8( any );
                     buffer.put( ( byte ) LdapConstants.SUBSTRINGS_FILTER_ANY_TAG );
                     buffer.put( TLV.getBytes( anyBytes.length ) );

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlCodec.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlCodec.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlCodec.java Fri Jun  6 23:28:06 2008
@@ -77,6 +77,7 @@
  * </pre>
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class EntryChangeControlCodec extends AbstractAsn1Object
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -25,6 +25,7 @@
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class EntryChangeControlContainer extends AbstractContainer
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlDecoder.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlDecoder.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlDecoder.java Fri Jun  6 23:28:06 2008
@@ -32,6 +32,7 @@
  * A decoder for EntryChangeControls.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class EntryChangeControlDecoder extends Asn1Decoder implements ControlDecoder
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -43,6 +43,7 @@
  * this class. As it is a singleton, these declaration are only done once.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class EntryChangeControlGrammar extends AbstractGrammar
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlStatesEnum.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlStatesEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlStatesEnum.java Fri Jun  6 23:28:06 2008
@@ -29,6 +29,7 @@
  * for debugging purposes.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class EntryChangeControlStatesEnum implements IStates
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlCodec.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlCodec.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlCodec.java Fri Jun  6 23:28:06 2008
@@ -33,6 +33,7 @@
  * A persistence search object
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PSearchControlCodec extends AbstractAsn1Object
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -25,6 +25,7 @@
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PSearchControlContainer extends AbstractContainer
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlDecoder.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlDecoder.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlDecoder.java Fri Jun  6 23:28:06 2008
@@ -32,6 +32,7 @@
  * A decoder for PSearchControls.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PSearchControlDecoder extends Asn1Decoder implements ControlDecoder
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -56,6 +56,7 @@
  * modDN  (8).
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PSearchControlGrammar extends AbstractGrammar
 {
@@ -111,7 +112,9 @@
          * Stores the change types value
          */
         super.transitions[PSearchControlStatesEnum.PSEARCH_SEQUENCE_STATE][UniversalTag.INTEGER_TAG] = 
-            new GrammarTransition( PSearchControlStatesEnum.PSEARCH_SEQUENCE_STATE, PSearchControlStatesEnum.CHANGE_TYPES_STATE, UniversalTag.INTEGER_TAG,
+            new GrammarTransition( PSearchControlStatesEnum.PSEARCH_SEQUENCE_STATE, 
+                PSearchControlStatesEnum.CHANGE_TYPES_STATE, 
+                UniversalTag.INTEGER_TAG,
                 new GrammarAction( "Set PSearchControl changeTypes" )
             {
                 public void action( IAsn1Container container ) throws DecoderException
@@ -122,7 +125,9 @@
                     try
                     {
                         // Check that the value is into the allowed interval
-                        int changeTypes = IntegerDecoder.parse( value, PSearchControlCodec.CHANGE_TYPES_MIN, PSearchControlCodec.CHANGE_TYPES_MAX );
+                        int changeTypes = IntegerDecoder.parse( value, 
+                            PSearchControlCodec.CHANGE_TYPES_MIN, 
+                            PSearchControlCodec.CHANGE_TYPES_MAX );
                         
                         if ( IS_DEBUG )
                         {
@@ -150,7 +155,8 @@
          * Stores the change only flag
          */
         super.transitions[PSearchControlStatesEnum.CHANGE_TYPES_STATE][UniversalTag.BOOLEAN_TAG] = 
-            new GrammarTransition( PSearchControlStatesEnum.CHANGE_TYPES_STATE, PSearchControlStatesEnum.CHANGES_ONLY_STATE, UniversalTag.BOOLEAN_TAG,
+            new GrammarTransition( PSearchControlStatesEnum.CHANGE_TYPES_STATE,
+                                    PSearchControlStatesEnum.CHANGES_ONLY_STATE, UniversalTag.BOOLEAN_TAG,
                 new GrammarAction( "Set PSearchControl changesOnly" )
             {
                 public void action( IAsn1Container container ) throws DecoderException
@@ -188,7 +194,8 @@
          * Stores the return ECs flag 
          */
         super.transitions[PSearchControlStatesEnum.CHANGES_ONLY_STATE][UniversalTag.BOOLEAN_TAG] = 
-            new GrammarTransition( PSearchControlStatesEnum.CHANGES_ONLY_STATE, PSearchControlStatesEnum.RETURN_ECS_STATE, UniversalTag.BOOLEAN_TAG,
+            new GrammarTransition( PSearchControlStatesEnum.CHANGES_ONLY_STATE, 
+                                    PSearchControlStatesEnum.RETURN_ECS_STATE, UniversalTag.BOOLEAN_TAG,
                 new GrammarAction( "Set PSearchControl returnECs" )
             {
                 public void action( IAsn1Container container ) throws DecoderException

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlStatesEnum.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlStatesEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlStatesEnum.java Fri Jun  6 23:28:06 2008
@@ -29,6 +29,7 @@
  * debugging purposes.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class PSearchControlStatesEnum implements IStates
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -25,6 +25,7 @@
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SubEntryControlContainer extends AbstractContainer
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlDecoder.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlDecoder.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlDecoder.java Fri Jun  6 23:28:06 2008
@@ -32,6 +32,7 @@
  * A decoder for SubEntryControls.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SubEntryControlDecoder extends Asn1Decoder implements ControlDecoder
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -41,6 +41,7 @@
  * this class. As it is a singleton, these declaration are only done once.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SubEntryControlGrammar extends AbstractGrammar
 {
@@ -63,7 +64,8 @@
         super.transitions = new GrammarTransition[SubEntryControlStatesEnum.LAST_SUB_ENTRY_STATE][256];
 
         super.transitions[SubEntryControlStatesEnum.START_STATE][UniversalTag.BOOLEAN_TAG] = 
-            new GrammarTransition( SubEntryControlStatesEnum.START_STATE, SubEntryControlStatesEnum.SUB_ENTRY_VISIBILITY_STATE, UniversalTag.BOOLEAN_TAG, 
+            new GrammarTransition( SubEntryControlStatesEnum.START_STATE, 
+                                    SubEntryControlStatesEnum.SUB_ENTRY_VISIBILITY_STATE, UniversalTag.BOOLEAN_TAG, 
                 new GrammarAction( "SubEntryControl visibility" )
             {
                 public void action( IAsn1Container container ) throws DecoderException

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlStatesEnum.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlStatesEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlStatesEnum.java Fri Jun  6 23:28:06 2008
@@ -29,6 +29,7 @@
  * debugging purposes.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class SubEntryControlStatesEnum implements IStates
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequest.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequest.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequest.java Fri Jun  6 23:28:06 2008
@@ -37,6 +37,7 @@
  * This ldapObject is empty.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class UnBindRequest extends LdapMessage
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/HttpClientError.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/HttpClientError.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/HttpClientError.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/HttpClientError.java Fri Jun  6 23:28:06 2008
@@ -31,7 +31,7 @@
  */
 public class HttpClientError extends Error
 {
-    final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
 
     /**

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapResultEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapResultEnum.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapResultEnum.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapResultEnum.java Fri Jun  6 23:28:06 2008
@@ -24,6 +24,7 @@
  * This typesafe-enum represent the different resultCode of a LdapResult.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class LdapResultEnum
 {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -20,11 +20,6 @@
 package org.apache.directory.shared.ldap.codec.util;
 
 
-import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.ldap.filter.FilterParser;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.util.StringTools;
-
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
 
@@ -40,6 +35,10 @@
 import javax.naming.InvalidNameException;
 import javax.naming.directory.SearchControls;
 
+import org.apache.directory.shared.ldap.filter.FilterParser;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
+
 
 /**
  * Decodes a LdapUrl, and checks that it complies with
@@ -62,12 +61,20 @@
  * xtoken     = ("X-" / "x-") token
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class LdapURL
 {
+
     // ~ Static fields/initializers
     // -----------------------------------------------------------------
 
+    /** The constant for "ldaps://" scheme. */
+    public static final String LDAPS_SCHEME = "ldaps://";
+
+    /** The constant for "ldap://" scheme. */
+    public static final String LDAP_SCHEME = "ldap://";
+
     /** A null LdapURL */
     public static final LdapURL EMPTY_URL = new LdapURL();
 
@@ -115,7 +122,7 @@
      */
     public LdapURL()
     {
-        super();
+        scheme = LDAP_SCHEME;
         host = null;
         port = -1;
         dn = null;
@@ -133,6 +140,7 @@
      */
     public void parse( char[] chars ) throws LdapURLEncodingException
     {
+        scheme = LDAP_SCHEME;
         host = null;
         port = -1;
         dn = null;
@@ -156,8 +164,8 @@
         int pos = 0;
 
         // The scheme
-        if ( ( ( pos = StringTools.areEquals( chars, 0, "ldap://" ) ) == StringTools.NOT_EQUAL )
-            && ( ( pos = StringTools.areEquals( chars, 0, "ldaps://" ) ) == StringTools.NOT_EQUAL ) )
+        if ( ( ( pos = StringTools.areEquals( chars, 0, LDAP_SCHEME ) ) == StringTools.NOT_EQUAL )
+            && ( ( pos = StringTools.areEquals( chars, 0, LDAPS_SCHEME ) ) == StringTools.NOT_EQUAL ) )
         {
             throw new LdapURLEncodingException( "A LdapUrl must start with \"ldap://\" or \"ldaps://\"" );
         }
@@ -178,7 +186,7 @@
         }
 
         // An optional '/'
-        if ( StringTools.isCharASCII( chars, pos, '/' ) == false )
+        if ( !StringTools.isCharASCII( chars, pos, '/' ) )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos]
                 + "', '/' expected" );
@@ -203,7 +211,7 @@
         }
 
         // Optionals attributes
-        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
+        if ( !StringTools.isCharASCII( chars, pos, '?' ) )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos]
                 + "', '?' expected" );
@@ -222,7 +230,7 @@
         }
 
         // Optional scope
-        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
+        if ( !StringTools.isCharASCII( chars, pos, '?' ) )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos]
                 + "', '?' expected" );
@@ -241,7 +249,7 @@
         }
 
         // Optional filter
-        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
+        if ( !StringTools.isCharASCII( chars, pos, '?' ) )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos]
                 + "', '?' expected" );
@@ -265,7 +273,7 @@
         }
 
         // Optional extensions
-        if ( StringTools.isCharASCII( chars, pos, '?' ) == false )
+        if ( !StringTools.isCharASCII( chars, pos, '?' ) )
         {
             throw new LdapURLEncodingException( "Bad character, position " + pos + ", '" + chars[pos]
                 + "', '?' expected" );
@@ -517,7 +525,7 @@
     private int parsePort( char[] chars, int pos )
     {
 
-        if ( StringTools.isDigit( chars, pos ) == false )
+        if ( !StringTools.isDigit( chars, pos ) )
         {
             return -1;
         }
@@ -665,7 +673,7 @@
      * 
      * @param bytes array of URL safe characters
      * @return array of original bytes
-     * @throws DecoderException Thrown if URL decoding is unsuccessful
+     * @throws UrlDecoderException Thrown if URL decoding is unsuccessful
      */
     private static final byte[] decodeUrl( byte[] bytes ) throws UrlDecoderException
     {
@@ -816,7 +824,7 @@
 
                         String decodedAttr = decode( attribute );
 
-                        if ( hAttributes.contains( decodedAttr ) == false )
+                        if ( !hAttributes.contains( decodedAttr ) )
                         {
                             attributes.add( decodedAttr );
                             hAttributes.add( decodedAttr );
@@ -863,7 +871,7 @@
 
                 String decodedAttr = decode( attribute );
 
-                if ( hAttributes.contains( decodedAttr ) == false )
+                if ( !hAttributes.contains( decodedAttr ) )
                 {
                     attributes.add( decodedAttr );
                     hAttributes.add( decodedAttr );
@@ -1004,7 +1012,7 @@
      * extensions ::= extension [ ',' extension ]* 
      * extension ::= [ '!' ] ( token | ( 'x-' | 'X-' ) token ) ) [ '=' exvalue ]
      * 
-     * @param char The char array to be checked
+     * @param chars The char array to be checked
      * @param pos the starting position
      * @return -1 if the char array does not contains valid extensions or
      *         critical extensions
@@ -1093,7 +1101,7 @@
                 else if ( StringTools.isCharASCII( chars, i, '!' ) )
                 {
 
-                    if ( isNewExtension == false )
+                    if ( !isNewExtension )
                     {
 
                         // '!' must appears first
@@ -1180,6 +1188,7 @@
 
                 default:
                     sb.append( c );
+                break;
             }
         }
 
@@ -1194,8 +1203,9 @@
      */
     public String toString()
     {
+        StringBuffer sb = new StringBuffer();
 
-        StringBuffer sb = new StringBuffer( "ldap://" );
+        sb.append( scheme );
 
         sb.append( ( host == null ) ? "" : host );
 
@@ -1209,8 +1219,8 @@
             sb.append( '/' ).append( urlEncode( dn.toString(), false ) );
 
             if ( ( attributes.size() != 0 )
-                || ( ( scope != SearchControls.OBJECT_SCOPE ) || ( filter != null ) || ( extensions.size() != 0 ) || ( criticalExtensions
-                    .size() != 0 ) ) )
+                || ( ( scope != SearchControls.OBJECT_SCOPE ) || ( filter != null ) || 
+                    ( extensions.size() != 0 ) || ( criticalExtensions.size() != 0 ) ) )
             {
                 sb.append( '?' );
 
@@ -1251,6 +1261,10 @@
                     case SearchControls.SUBTREE_SCOPE:
                         sb.append( "sub" );
                         break;
+                        
+                        
+                    default :
+                        break;
                 }
 
                 if ( ( filter != null ) || ( ( extensions.size() != 0 ) || ( criticalExtensions.size() != 0 ) ) )
@@ -1273,7 +1287,7 @@
                             for ( String key:extensions.keySet() )
                             {
 
-                                if ( isFirst == false )
+                                if ( !isFirst )
                                 {
                                     sb.append( ',' );
                                 }
@@ -1294,7 +1308,7 @@
                             for ( String key:criticalExtensions.keySet() )
                             {
 
-                                if ( isFirst == false )
+                                if ( !isFirst )
                                 {
                                     sb.append( ",!" );
                                 }
@@ -1385,6 +1399,9 @@
 
 
     /**
+     * Returns the scope, one of {@link SearchControls.OBJECT_SCOPE}, 
+     * {@link SearchControls.ONELEVEL_SCOPE} or {@link SearchControls.SUBTREE_SCOPE}.
+     * 
      * @return Returns the scope.
      */
     public int getScope()
@@ -1442,6 +1459,10 @@
         return string;
     }
 
+    /**
+     * Compute the instance's hash code
+     * @return the instance's hash code 
+     */
     public int hashCode()
     {
         return this.toString().hashCode();
@@ -1465,4 +1486,149 @@
         final LdapURL other = ( LdapURL ) obj;
         return this.toString().equals( other.toString() );
     }
+
+    
+    /**
+     * Sets the scheme. Must be "ldap://" or "ldaps://", otherwise "ldap://" is assumed as default.
+     * 
+     * @param scheme the new scheme
+     */
+    public void setScheme( String scheme )
+    {
+        if ( scheme != null && LDAP_SCHEME.equals( scheme ) || LDAPS_SCHEME.equals( scheme ) )
+        {
+            this.scheme = scheme;
+        }
+        else
+        {
+            this.scheme = LDAP_SCHEME;
+        }
+
+    }
+
+
+    /**
+     * Sets the host.
+     * 
+     * @param host the new host
+     */
+    public void setHost( String host )
+    {
+        this.host = host;
+    }
+
+
+    /**
+     * Sets the port. Must be between 1 and 65535, otherwise -1 is assumed as default.
+     * 
+     * @param port the new port
+     */
+    public void setPort( int port )
+    {
+        if ( port < 1 || port > 65535 )
+        {
+            this.port = -1;
+        }
+        else
+        {
+            this.port = port;
+        }
+    }
+
+
+    /**
+     * Sets the dn.
+     * 
+     * @param dn the new dn
+     */
+    public void setDn( LdapDN dn )
+    {
+        this.dn = dn;
+    }
+
+
+    /**
+     * Sets the attributes, null removes all existing attributes.
+     * 
+     * @param attributes the new attributes
+     */
+    public void setAttributes( List<String> attributes )
+    {
+        if ( attributes == null )
+        {
+            this.attributes.clear();
+        }
+        else
+        {
+            this.attributes = attributes;
+        }
+    }
+
+
+    /**
+     * Sets the scope. Must be one of {@link SearchControls.OBJECT_SCOPE}, 
+     * {@link SearchControls.ONELEVEL_SCOPE} or {@link SearchControls.SUBTREE_SCOPE},
+     * otherwise {@link SearchControls.OBJECT_SCOPE} is assumed as default.
+     * 
+     * @param scope the new scope
+     */
+    public void setScope( int scope )
+    {
+        if ( scope == SearchControls.ONELEVEL_SCOPE || scope == SearchControls.SUBTREE_SCOPE )
+        {
+            this.scope = scope;
+        }
+        else
+        {
+            this.scope = SearchControls.OBJECT_SCOPE;
+        }
+    }
+
+
+    /**
+     * Sets the filter.
+     * 
+     * @param filter the new filter
+     */
+    public void setFilter( String filter )
+    {
+        this.filter = filter;
+    }
+
+
+    /**
+     * Sets the extensions, null removes all existing extensions.
+     * 
+     * @param extensions the extensions
+     */
+    public void setExtensions( Map<String, String> extensions )
+    {
+        if ( extensions == null )
+        {
+            this.extensions.clear();
+        }
+        else
+        {
+            this.extensions = extensions;
+        }
+    }
+
+
+    /**
+     * Sets the critical extensions, null removes all existing critical extensions.
+     * 
+     * @param criticalExtensions the critical extensions
+     */
+    public void setCriticalExtensions( Map<String, String> criticalExtensions )
+    {
+        if ( criticalExtensions == null )
+        {
+            this.criticalExtensions.clear();
+        }
+        else
+        {
+            this.criticalExtensions = criticalExtensions;
+        }
+    }
+
 }

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURLEncodingException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURLEncodingException.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURLEncodingException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapURLEncodingException.java Fri Jun  6 23:28:06 2008
@@ -26,6 +26,7 @@
  * during the String creation.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$, 
  */
 public class LdapURLEncodingException extends Exception
 {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/URIException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/URIException.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/URIException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/URIException.java Fri Jun  6 23:28:06 2008
@@ -29,7 +29,7 @@
  */
 public class URIException extends Exception
 {
-    final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
 
     // ----------------------------------------------------------- constructors

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/UrlDecoderException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/UrlDecoderException.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/UrlDecoderException.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/UrlDecoderException.java Fri Jun  6 23:28:06 2008
@@ -29,7 +29,7 @@
  */
 public class UrlDecoderException extends Exception
 {
-    final static long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
 
     /**

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/Entry.java Fri Jun  6 23:28:06 2008
@@ -19,12 +19,12 @@
 package org.apache.directory.shared.ldap.entry;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import java.util.Iterator;
+import java.util.List;
 
 import javax.naming.NamingException;
 
-import java.util.Iterator;
-import java.util.List;
+import org.apache.directory.shared.ldap.name.LdapDN;
 
 
 /**

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientAttribute.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientAttribute.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientAttribute.java Fri Jun  6 23:28:06 2008
@@ -19,11 +19,11 @@
 package org.apache.directory.shared.ldap.entry.client;
 
 
+import javax.naming.NamingException;
+
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
 
-import javax.naming.NamingException;
-
 
 /**
  * The server specific interface extending the EntryAttribute interface. It adds

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientBinaryValue.java Fri Jun  6 23:28:06 2008
@@ -19,6 +19,14 @@
 package org.apache.directory.shared.ldap.entry.client;
 
 
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Arrays;
+
+import javax.naming.NamingException;
+
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.entry.AbstractValue;
 import org.apache.directory.shared.ldap.entry.Value;
@@ -28,14 +36,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.Arrays;
-
 
 /**
  * A server side schema aware wrapper around a binary attribute value.
@@ -49,7 +49,7 @@
 public class ClientBinaryValue extends AbstractValue<byte[]>
 {
     /** Used for serialization */
-    public static final long serialVersionUID = 2L;
+    private static final long serialVersionUID = 2L;
     
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger LOG = LoggerFactory.getLogger( ClientBinaryValue.class );
@@ -247,8 +247,7 @@
 
     /**
      * @see Object#hashCode()
-     * @throws IllegalStateException on failures to extract the comparator, or the
-     * normalizers needed to perform the required comparisons based on the schema
+     * @return the instance's hashcode 
      */
     public int hashCode()
     {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/ClientStringValue.java Fri Jun  6 23:28:06 2008
@@ -24,6 +24,8 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.entry.AbstractValue;
 import org.apache.directory.shared.ldap.entry.Value;
@@ -31,8 +33,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
-
 
 /**
  * A server side schema aware wrapper around a String attribute value.
@@ -46,7 +46,7 @@
 public class ClientStringValue extends AbstractValue<String>
 {
     /** Used for serialization */
-    public static final long serialVersionUID = 2L;
+    private static final long serialVersionUID = 2L;
     
     
     /** logger for reporting errors that might not be handled properly upstream */
@@ -247,8 +247,7 @@
     // -----------------------------------------------------------------------
     /**
      * @see Object#hashCode()
-     * @throws IllegalStateException on failures to extract the comparator, or the
-     * normalizers needed to perform the required comparisons based on the schema
+     * @return the instance's hashcode 
      */
     public int hashCode()
     {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttribute.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttribute.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttribute.java Fri Jun  6 23:28:06 2008
@@ -19,6 +19,14 @@
 package org.apache.directory.shared.ldap.entry.client;
 
 
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.naming.NamingException;
+import javax.naming.directory.InvalidAttributeValueException;
+
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.schema.syntax.SyntaxChecker;
@@ -26,14 +34,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
-import javax.naming.directory.InvalidAttributeValueException;
-
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
 
 /**
  * A client side entry attribute. The client is not aware of the schema,
@@ -46,9 +46,6 @@
  */
 public class DefaultClientAttribute implements ClientAttribute
 {
-    /** Used for serialization */
-    public static final long serialVersionUID = 2L;
-    
     /** logger for reporting errors that might not be handled properly upstream */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultClientAttribute.class );
     
@@ -1219,6 +1216,7 @@
      * on the internal values.
      *  
      * @see Object#hashCode()
+     * @return the instance's hashcode 
      */
     public int hashCode()
     {

Modified: directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java?rev=664290&r1=664289&r2=664290&view=diff
==============================================================================
--- directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java (original)
+++ directory/shared/branches/bigbang/ldap/src/main/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntry.java Fri Jun  6 23:28:06 2008
@@ -32,6 +32,8 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import javax.naming.NamingException;
+
 import org.apache.directory.shared.ldap.entry.AbstractEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -41,8 +43,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.NamingException;
-
 
 /**
  * A default implementation of a ServerEntry which should suite most
@@ -56,7 +56,7 @@
 public final class DefaultClientEntry extends AbstractEntry<String> implements ClientEntry, Externalizable
 {
     /** Used for serialization */
-    public static final long serialVersionUID = 2L;
+    private static final long serialVersionUID = 2L;
     
     /** The logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultClientEntry.class );
@@ -1042,9 +1042,10 @@
     
     
     /**
-    * Get the hashcode of this ClientEntry.
-    *
-    * @see java.lang.Object#hashCode()
+     * Get the hash code of this ClientEntry.
+     *
+     * @see java.lang.Object#hashCode()
+     * @return the instance's hash code 
      */
     public int hashCode()
     {

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -20,8 +20,8 @@
 package org.apache.directory.shared.ldap.filter;
 
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -35,29 +35,108 @@
     /** The map of annotations */
     protected Map<String, Object> annotations;
 
+    /** The node type */
     protected final AssertionType assertionType;
     
     
     /**
      * Creates a node by setting abstract node type.
+     * 
+     * @param assertionType The node's type
      */
     protected AbstractExprNode( AssertionType assertionType )
     {
         this.assertionType = assertionType;
     }
-    
-    
+
+
     /**
      * @see ExprNode#getAssertionType()
+     * 
+     * @return the node's type
      */
     public AssertionType getAssertionType()
     {
         return assertionType;
     }
 
+
+    /**
+     * Tests to see if this node is a leaf or branch node.
+     * 
+     * @return true if the node is a leaf,false otherwise
+     */
+    public abstract boolean isLeaf();
+
     
     /**
+     * @see Object#equals(Object)
+     *@return <code>true</code> if both objects are equal 
+     */
+    public boolean equals( Object o )
+    {
+        // Shortcut for equals object
+        if ( this == o )
+        {
+            return true;
+        }
+        
+        if ( !( o instanceof AbstractExprNode ) )
+        {
+            return false;
+        }
+        
+        AbstractExprNode that = (AbstractExprNode)o;
+        
+        // Check the node type
+        if ( this.assertionType != that.assertionType )
+        {
+            return false;
+        }
+        
+        if ( annotations == null )
+        {
+            return that.annotations == null;
+        }
+        else if ( that.annotations == null )
+        {
+            return false;
+        }
+        
+        // Check all the annotation
+        for ( String key:annotations.keySet() )
+        {
+            if ( !that.annotations.containsKey( key ) )
+            {
+                return false;
+            }
+            
+            Object thisAnnotation = annotations.get( key ); 
+            Object thatAnnotation = that.annotations.get( key );
+            
+            if ( thisAnnotation == null )
+            {
+                if ( thatAnnotation != null )
+                {
+                    return false;
+                }
+            }
+            else
+            {
+                if ( !thisAnnotation.equals( thatAnnotation ) )
+                {
+                    return false;
+                }
+            }
+        }
+        
+        return true;
+    }
+
+
+    /**
      * @see Object#hashCode()
+     * @return the instance's hash code 
      */
     public int hashCode()
     {
@@ -77,8 +156,11 @@
         return h;
     }
 
+
     /**
      * @see org.apache.directory.shared.ldap.filter.ExprNode#get(java.lang.Object)
+     * 
+     * @return the annotation value.
      */
     public Object get( Object key )
     {
@@ -105,7 +187,7 @@
         annotations.put( key, value );
     }
 
-    
+
     /**
      * Gets the annotations as a Map.
      * 
@@ -115,7 +197,21 @@
     {
         return annotations;
     }
-    
+
+
+    /**
+     * Default implementation for this method : just throw an exception.
+     * 
+     * @param buf the buffer to append to.
+     * @return The buffer in which the refinement has been appended
+     * @throws UnsupportedOperationException if this node isn't a part of a refinement.
+     */
+    public StringBuilder printRefinementToBuffer( StringBuilder buf )
+    {
+        throw new UnsupportedOperationException( "ScopeNode can't be part of a refinement" );
+    }
+
+
     public String toString()
     {
         if ( ( null != getAnnotations() ) && getAnnotations().containsKey( "count" ) )
@@ -124,7 +220,7 @@
         }
         else 
         {
-        	return "";
+            return "";
         }
     }
 }

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -36,9 +36,9 @@
      * 
      * @param childList the child nodes under this branch node.
      */
-    public AndNode( List<ExprNode> children )
+    public AndNode( List<ExprNode> childList )
     {
-        super( children, AssertionType.AND );
+        super( childList, AssertionType.AND );
     }
 
 
@@ -97,23 +97,27 @@
     
     /**
      * @see ExprNode#printRefinementToBuffer(StringBuffer)
+     * 
+     * @param buf the buffer to append to.
+     * @return The buffer in which the refinement has been appended
+     * @throws UnsupportedOperationException if this node isn't a part of a refinement.
      */
-    public StringBuilder printRefinementToBuffer( StringBuilder buf ) throws UnsupportedOperationException
+    public StringBuilder printRefinementToBuffer( StringBuilder buf )
     {
         buf.append( "and: {" );
         boolean isFirst = true;
         
         for ( ExprNode node:children )
         {
-        	if ( isFirst )
-        	{
-        		isFirst = false;
-        	}
-        	else
-        	{
-        		buf.append( ", " );
-        	}
-        	
+            if ( isFirst )
+            {
+                isFirst = false;
+            }
+            else
+            {
+                buf.append( ", " );
+            }
+            
             node.printRefinementToBuffer( buf );
         }
         
@@ -127,6 +131,7 @@
      * down.
      * 
      * @see java.lang.Object#toString()
+     * @return A string representing the AndNode
      */
     public String toString()
     {
@@ -137,7 +142,7 @@
 
         for ( ExprNode child:getChildren() )
         {
-        	buf.append( child );
+            buf.append( child );
         }
         
         buf.append( ')' );
@@ -148,6 +153,7 @@
 
     /**
      * @see Object#hashCode()
+     * @return the instance's hash code 
      */
     public int hashCode()
     {
@@ -186,18 +192,18 @@
 
         if ( children.size() != otherChildren.size() )
         {
-        	return false;
+            return false;
         }
         
         for ( int i = 0; i < children.size(); i++ )
         {
-        	ExprNode child = children.get( i );
-        	ExprNode otherChild = children.get( i );
-        	
-        	if ( !child.equals( otherChild ) )
-        	{
-        		return false;
-        	}
+            ExprNode child = children.get( i );
+            ExprNode otherChild = children.get( i );
+            
+            if ( !child.equals( otherChild ) )
+            {
+                return false;
+            }
         }
         
         return true;

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -41,17 +41,10 @@
     }
 
 
-    /**
-     * @see Object#hashCode()
-     */
-    public int hashCode()
-    {
-        return super.hashCode();
-    }
-
     
     /**
      * @see Object#toString()
+     * @return A string representing the AndNode
      */
     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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -97,6 +97,7 @@
      * Always returns true since an AssertionNode has no children.
      * 
      * @see org.apache.directory.shared.ldap.filter.ExprNode#isLeaf()
+     * @return true if the node is a leaf,false otherwise
      */
     public boolean isLeaf()
     {
@@ -115,6 +116,7 @@
 
     /**
      * @see Object#hashCode()
+     * @return the instance's hash code 
      */
     public int hashCode()
     {
@@ -140,16 +142,17 @@
 
     /**
      * @see Object#toString
+     * @return A string representing the AndNode
      */
     public String toString()
     {
-    	StringBuilder buf = new StringBuilder();
-    	
-    	buf.append( "(@" );
-    	buf.append( desc );
-    	buf.append( super.toString() );
-    	buf.append( ')' );
-    	
+        StringBuilder buf = new StringBuilder();
+        
+        buf.append( "(@" );
+        buf.append( desc );
+        buf.append( super.toString() );
+        buf.append( ')' );
+        
         return buf.toString();
     }
 }

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=664290&r1=664289&r2=664290&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 Fri Jun  6 23:28:06 2008
@@ -31,7 +31,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public abstract class BranchNode extends AbstractExprNode
+public class BranchNode extends AbstractExprNode
 {
     /** child node list for this branch node */
     protected List<ExprNode> children = null;
@@ -41,26 +41,29 @@
      * Creates a BranchNode using a logical operator and a list of children.
      * 
      * @param childList the child nodes under this branch node.
+     * @param assertionType the node's type
      */
-    public BranchNode( List<ExprNode> children, AssertionType assertionType )
+    protected BranchNode( List<ExprNode> childList, AssertionType assertionType )
     {
         super( assertionType );
 
-        if ( null == children )
+        if ( null == childList )
         {
             this.children = new ArrayList<ExprNode>( 2 );
         }
         else
         {
-            this.children = children;
+            this.children = childList;
         }
     }
 
 
     /**
      * Creates a BranchNode using a logical operator.
+     * 
+     * @param assertionType the node's type
      */
-    public BranchNode( AssertionType assertionType )
+    protected BranchNode( AssertionType assertionType )
     {
         this( null, assertionType );
     }
@@ -142,12 +145,14 @@
     /**
      * @see org.apache.directory.shared.ldap.filter.ExprNode#accept(
      *      org.apache.directory.shared.ldap.filter.FilterVisitor)
+     *      
+     * @return The modified element
      */
     public final Object accept( FilterVisitor visitor )
     {
         if ( visitor.isPrefix() )
         {
-            List<ExprNode> children = visitor.getOrder( this, this.children );
+            List<ExprNode> childrenList = visitor.getOrder( this, this.children );
             ExprNode result = null;
 
             if ( visitor.canVisit( this ) )
@@ -155,7 +160,7 @@
                 result = (ExprNode)visitor.visit( this );
             }
 
-            for ( ExprNode node:children )
+            for ( ExprNode node:childrenList )
             {
                 node.accept( visitor );
             }
@@ -170,7 +175,7 @@
             }
             else
             {
-            	return null;
+                return null;
             }
         }
     }
@@ -180,6 +185,7 @@
      * (non-Javadoc)
      * 
      * @see Object#hashCode()
+     * @return the instance's hash code 
      */
     public int hashCode()
     {
@@ -217,7 +223,7 @@
         
         if ( other.getClass() != this.getClass() )
         {
-        	return false;
+            return false;
         }
 
         BranchNode otherExprNode = ( BranchNode ) other;
@@ -231,18 +237,18 @@
 
         if ( children.size() != otherChildren.size() )
         {
-        	return false;
+            return false;
         }
         
         for ( int i = 0; i < children.size(); i++ )
         {
-        	ExprNode child = children.get( i );
-        	ExprNode otherChild = children.get( i );
-        	
-        	if ( !child.equals( otherChild ) )
-        	{
-        		return false;
-        	}
+            ExprNode child = children.get( i );
+            ExprNode otherChild = children.get( i );
+            
+            if ( !child.equals( otherChild ) )
+            {
+                return false;
+            }
         }
         
         return true;



Mime
View raw message