directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r992908 [1/2] - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/ shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ shared/trunk/asn1/src/main/java/org/apache/directory/shared/a...
Date Sun, 05 Sep 2010 22:52:55 GMT
Author: elecharny
Date: Sun Sep  5 22:52:54 2010
New Revision: 992908

URL: http://svn.apache.org/viewvc?rev=992908&view=rev
Log:
o Modified the error messages to have the error number just after the ERR
o Fixed Javadoc, reviewed some files

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/binary/Hex.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ClosureMonitor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorClosedException.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorStateEnum.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InconsistentCursorStateException.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InvalidCursorPositionException.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
    directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemChecker.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java Sun Sep  5 22:52:54 2010
@@ -93,19 +93,19 @@ public class CursorList implements Entry
 
         if ( ( start < 0 ) || ( start > this.list.size() ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02005, start ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02005_START_INDEX_OUT_OF_RANGE, start ) );
         }
 
         if ( ( end < 0 ) || ( end > this.list.size() ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02006, end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02006_END_INDEX_OUT_OF_RANGE, end ) );
         }
 
         // check list is not empty list since the empty list is the only situation
         // where we allow for start to equal the end: in other cases it makes no sense
         if ( ( this.list.size() > 0 ) && ( start >= end ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02007, start, end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02007_START_INDEX_ABOVE_END_INDEX, start, end ) );
         }
 
         this.start = start;
@@ -133,9 +133,9 @@ public class CursorList implements Entry
     {
         if ( index >= 0 && index < end )
         {
-            return list.get( index ).available(); 
+            return list.get( index ).available();
         }
-        
+
         return false;
     }
 
@@ -175,7 +175,7 @@ public class CursorList implements Entry
      */
     public void afterLast() throws Exception
     {
-        this.index = end-1;
+        this.index = end - 1;
         list.get( index ).afterLast();
     }
 
@@ -369,10 +369,10 @@ public class CursorList implements Entry
     {
         if ( index < start || index >= end )
         {
-            throw new IOException( I18n.err( I18n.ERR_02009 ) );
+            throw new IOException( I18n.err( I18n.ERR_02009_CURSOR_NOT_POSITIONED ) );
         }
 
-        if( list.get( index ).available() )
+        if ( list.get( index ).available() )
         {
             return ( ClonedServerEntry ) list.get( index ).get();
         }
@@ -391,11 +391,11 @@ public class CursorList implements Entry
 
     public boolean addEntryFilter( EntryFilter filter )
     {
-        for( EntryFilteringCursor efc : list )
+        for ( EntryFilteringCursor efc : list )
         {
             efc.addEntryFilter( filter );
         }
-        
+
         // returning hard coded value, shouldn't be a problem
         return true;
     }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/AbstractAsn1Object.java Sun Sep  5 22:52:54 2010
@@ -126,7 +126,7 @@ public abstract class AbstractAsn1Object
 
         if ( currentLength > expectedLength )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH_00041 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00041_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH ) );
         }
     }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java Sun Sep  5 22:52:54 2010
@@ -214,7 +214,7 @@ public class Asn1Decoder implements TLVB
 
                 if ( expectedLength > 4 )
                 {
-                    String msg = I18n.err( I18n.ERR_LENGTH_OVERFLOW_00005 );
+                    String msg = I18n.err( I18n.ERR_00005_LENGTH_OVERFLOW );
                     LOG.error( msg );
                     throw new DecoderException( msg );
                 }
@@ -226,7 +226,7 @@ public class Asn1Decoder implements TLVB
             }
             else
             {
-                String msg = I18n.err( I18n.ERR_LENGTH_EXTENSION_RESERVED_00006 );
+                String msg = I18n.err( I18n.ERR_00006_LENGTH_EXTENSION_RESERVED );
                 LOG.error( msg );
                 throw new DecoderException( msg );
             }
@@ -343,7 +343,7 @@ public class Asn1Decoder implements TLVB
 
         if ( tlv == null )
         {
-            String msg = I18n.err( I18n.ERR_TLV_NULL_00007 );
+            String msg = I18n.err( I18n.ERR_00007_TLV_NULL );
             LOG.error( msg );
             throw new DecoderException( msg );
         }
@@ -384,7 +384,7 @@ public class Asn1Decoder implements TLVB
                 // The expected length is lower than the Value length of the
                 // current TLV. This is an error...
                 LOG.debug( "tlv[{}, {}]", Integer.valueOf( expectedLength ), Integer.valueOf( currentLength ) );
-                throw new DecoderException( I18n.err( I18n.ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_00008, Integer
+                throw new DecoderException( I18n.err( I18n.ERR_00008_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH, Integer
                     .valueOf( currentLength ), Integer.valueOf( expectedLength ) ) );
             }
 
@@ -615,8 +615,8 @@ public class Asn1Decoder implements TLVB
                 }
                 else
                 {
-                    LOG.error( I18n.err( I18n.ERR_MORE_TLV_EXPECTED_00009 ) );
-                    throw new DecoderException( I18n.err( I18n.ERR_TRUNCATED_PDU_00010 ) );
+                    LOG.error( I18n.err( I18n.ERR_00009_MORE_TLV_EXPECTED ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_00010_TRUNCATED_PDU ) );
                 }
             }
         }
@@ -660,7 +660,7 @@ public class Asn1Decoder implements TLVB
 
         if ( container.getDecodeBytes() > container.getMaxPDUSize() )
         {
-            String message = I18n.err( I18n.ERR_PDU_SIZE_TOO_LONG_00042, container.getDecodeBytes(), container
+            String message = I18n.err( I18n.ERR_00042_PDU_SIZE_TOO_LONG, container.getDecodeBytes(), container
                 .getMaxPDUSize() );
             LOG.error( message );
             throw new DecoderException( message );
@@ -739,7 +739,7 @@ public class Asn1Decoder implements TLVB
                 case PDU_DECODED:
                     // We have to deal with the case where there are
                     // more bytes in the buffer, but the PDU has been decoded.
-                    LOG.warn( I18n.err( I18n.ERR_REMAINING_BYTES_FOR_DECODED_PDU_00043 ) );
+                    LOG.warn( I18n.err( I18n.ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU ) );
 
                     hasRemaining = false;
 
@@ -842,7 +842,7 @@ public class Asn1Decoder implements TLVB
     {
         if ( ( this.indefiniteLengthAllowed ) && ( maxLengthLength > 126 ) )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00011_LENGTH_TOO_LONG_FOR_DEFINITE_FORM ) );
         }
 
         this.maxLengthLength = maxLengthLength;

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java Sun Sep  5 22:52:54 2010
@@ -124,14 +124,14 @@ public abstract class AbstractGrammar im
 
         if ( transition == null )
         {
-            String errorMessage = I18n.err( I18n.ERR_BAD_TRANSITION_FROM_STATE_00001, currentGrammar.getStatesEnum()
+            String errorMessage = I18n.err( I18n.ERR_00001_BAD_TRANSITION_FROM_STATE, currentGrammar.getStatesEnum()
                 .getState( currentState ), Asn1StringUtils.dumpByte( tagByte ) );
 
             LOG.error( errorMessage );
 
             // If we have no more grammar on the stack, then this is an
             // error
-            throw new DecoderException( I18n.err( I18n.ERR_BAD_TRANSITION_00002 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00002_BAD_TRANSITION ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/tlv/Value.java Sun Sep  5 22:52:54 2010
@@ -638,7 +638,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -656,7 +656,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -673,7 +673,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -690,7 +690,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -707,7 +707,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -726,7 +726,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -743,7 +743,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -758,7 +758,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -775,7 +775,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -786,7 +786,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -803,7 +803,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -814,7 +814,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -832,7 +832,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -843,7 +843,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -860,7 +860,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -871,7 +871,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 
@@ -888,7 +888,7 @@ public class Value implements Serializab
     {
         if ( buffer == null )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
         }
 
         try
@@ -904,7 +904,7 @@ public class Value implements Serializab
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( I18n.err( I18n.ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ) );
         }
     }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/binary/Hex.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/binary/Hex.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/binary/Hex.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/binary/Hex.java Sun Sep  5 22:52:54 2010
@@ -58,7 +58,7 @@ public class Hex implements BinaryEncode
 
         if ( ( len & 0x01 ) != 0 )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_ODD_NUM_OF_CHARS_00013 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00013_ODD_NUM_OF_CHARS ) );
         }
 
         byte[] out = new byte[len >> 1];
@@ -91,7 +91,7 @@ public class Hex implements BinaryEncode
 
         if ( digit == -1 )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_ILLEGAL_HEX_CHAR_00014, ch, index ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00014_ILLEGAL_HEX_CHAR, ch, index ) );
         }
 
         return digit;

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java Sun Sep  5 22:52:54 2010
@@ -46,7 +46,7 @@ public class ASN1InputStream extends Fil
     {
         public void encode( ASN1OutputStream out ) throws IOException
         {
-            throw new IOException( I18n.err( I18n.ERR_END_OF_STREAM_00016 ) );
+            throw new IOException( I18n.err( I18n.ERR_00016_END_OF_STREAM ) );
         }
 
 
@@ -112,7 +112,7 @@ public class ASN1InputStream extends Fil
         int length = read();
         if ( length < 0 )
         {
-            throw new IOException( I18n.err( I18n.ERR_EOF_FOUND_LENGTH_EXPECTED_00017 ) );
+            throw new IOException( I18n.err( I18n.ERR_00017_EOF_FOUND_LENGTH_EXPECTED ) );
         }
 
         // Indefinite-length encoding.
@@ -127,7 +127,7 @@ public class ASN1InputStream extends Fil
 
             if ( size > 4 )
             {
-                throw new IOException( I18n.err( I18n.ERR_DER_LENGTH_ABOVE_4_BYTES_00018 ) );
+                throw new IOException( I18n.err( I18n.ERR_00018_DER_LENGTH_ABOVE_4_BYTES ) );
             }
 
             length = 0;
@@ -137,7 +137,7 @@ public class ASN1InputStream extends Fil
 
                 if ( next < 0 )
                 {
-                    throw new IOException( I18n.err( I18n.ERR_EOF_FOUND_IN_LENGTH_00019 ) );
+                    throw new IOException( I18n.err( I18n.ERR_00019_EOF_FOUND_IN_LENGTH ) );
                 }
 
                 length = ( length << 8 ) + next;
@@ -145,7 +145,7 @@ public class ASN1InputStream extends Fil
 
             if ( length < 0 )
             {
-                throw new IOException( I18n.err( I18n.ERR_CORRUPTED_STREAM_00020 ) );
+                throw new IOException( I18n.err( I18n.ERR_00020_CORRUPTED_STREAM ) );
             }
         }
 
@@ -173,7 +173,7 @@ public class ASN1InputStream extends Fil
 
         if ( left != 0 )
         {
-            throw new EOFException( I18n.err( I18n.ERR_EOF_FOUND_IN_OBJECT_00021 ) );
+            throw new EOFException( I18n.err( I18n.ERR_00021_EOF_FOUND_IN_OBJECT ) );
         }
     }
 
@@ -397,7 +397,7 @@ public class ASN1InputStream extends Fil
         {
             if ( EOF_FOUND )
             {
-                throw new EOFException( I18n.err( I18n.ERR_READ_PAST_END_OF_FILE_00022 ) );
+                throw new EOFException( I18n.err( I18n.ERR_00022_READ_PAST_END_OF_FILE ) );
             }
 
             EOF_FOUND = true;
@@ -508,7 +508,7 @@ public class ASN1InputStream extends Fil
                         return new BERTaggedObject( false, tagNo, berSequence );
                     }
 
-                    throw new IOException( I18n.err( I18n.ERR_UNKNOWN_BER_OBJECT_00023 ) );
+                    throw new IOException( I18n.err( I18n.ERR_00023_UNKNOWN_BER_OBJECT ) );
             }
         }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java Sun Sep  5 22:52:54 2010
@@ -109,7 +109,7 @@ public class ASN1OutputStream extends Fi
         }
         else
         {
-            throw new IOException( I18n.err( I18n.ERR_OBJECT_NOT_DER_ENCODABLE_00024 ) );
+            throw new IOException( I18n.err( I18n.ERR_00024_OBJECT_NOT_DER_ENCODABLE ) );
         }
     }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java Sun Sep  5 22:52:54 2010
@@ -71,12 +71,12 @@ public class BERConstructedOctetString e
             }
             catch ( ClassCastException e )
             {
-                throw new IllegalArgumentException( I18n.err( I18n.ERR_DER_OCTET_STRING_EXPECTED_00025, octs.elementAt(
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_00025_DER_OCTET_STRING_EXPECTED, octs.elementAt(
                     i ).getClass().getName() ) );
             }
             catch ( IOException e )
             {
-                throw new IllegalArgumentException( I18n.err( I18n.ERR_CANNOT_CONVERT_OCTETS_00026, e.toString() ) );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_00026_CANNOT_CONVERT_OCTETS, e.toString() ) );
             }
         }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java Sun Sep  5 22:52:54 2010
@@ -101,7 +101,7 @@ public class BERTaggedObject extends DER
                 }
                 else
                 {
-                    throw new RuntimeException( I18n.err( I18n.ERR_NOT_IMPLEMENTED_00027, obj.getClass().getName() ) );
+                    throw new RuntimeException( I18n.err( I18n.ERR_00027_NOT_IMPLEMENTED, obj.getClass().getName() ) );
                 }
             }
             else

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java Sun Sep  5 22:52:54 2010
@@ -60,7 +60,7 @@ public class DERUniversalString extends 
         }
         catch ( IOException e )
         {
-            throw new RuntimeException( I18n.err( I18n.ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028 ) );
+            throw new RuntimeException( I18n.err( I18n.ERR_00028_INTERNAL_ERROR_ENCODING_BITSTRING ) );
         }
 
         byte[] string = baos.toByteArray();

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/BitString.java Sun Sep  5 22:52:54 2010
@@ -75,7 +75,7 @@ public class BitString implements Serial
         if ( length <= 0 )
         {
             // This is not allowed
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029 ) );
+            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00029_NULL_OR_NEG_LENGTH_NOT_ALLOWED ) );
         }
 
         nbBits = length;
@@ -115,7 +115,7 @@ public class BitString implements Serial
         if ( length <= 0 )
         {
             // This is not allowed
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029 ) );
+            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00029_NULL_OR_NEG_LENGTH_NOT_ALLOWED ) );
         }
 
         nbBits = length;
@@ -256,7 +256,7 @@ public class BitString implements Serial
     {
         if ( ( pos < 0 ) || ( pos > nbBits ) )
         {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_BIT_NUMBER_OUT_OF_BOUND_00030 ) );
+            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030_BIT_NUMBER_OUT_OF_BOUND ) );
         }
 
         int posInt = nbBytes - 1 - ( ( pos + nbUnusedBits ) >> 3 );
@@ -278,7 +278,7 @@ public class BitString implements Serial
     {
         if ( ( pos < 0 ) || ( pos > nbBits ) )
         {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_BIT_NUMBER_OUT_OF_BOUND_00030 ) );
+            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030_BIT_NUMBER_OUT_OF_BOUND ) );
         }
 
         int posInt = nbBytes - 1 - ( ( pos + nbUnusedBits ) >> 3 );
@@ -312,7 +312,7 @@ public class BitString implements Serial
     {
         if ( pos > nbBits )
         {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_CANNOT_FIND_BIT_00031, pos, nbBits ) );
+            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00031_CANNOT_FIND_BIT, pos, nbBits ) );
         }
 
         int posInt = nbBytes - 1 - ( ( pos + nbUnusedBits ) >> 3 );

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/primitives/OID.java Sun Sep  5 22:52:54 2010
@@ -122,12 +122,12 @@ public class OID implements Serializable
     {
         if ( oid == null )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_NULL_OID_00032 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00032_NULL_OID ) );
         }
 
         if ( oid.length < 1 )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, Asn1StringUtils.dumpBytes( oid ) ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, Asn1StringUtils.dumpBytes( oid ) ) );
         }
 
         // First, we have to calculate the number of int to allocate
@@ -219,7 +219,7 @@ public class OID implements Serializable
     {
         if ( ( oid == null ) || ( oid.length() == 0 ) )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_NULL_OID_00032 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00032_NULL_OID ) );
         }
 
         int nbValues = 1;
@@ -234,7 +234,7 @@ public class OID implements Serializable
                 if ( dotSeen )
                 {
                     // Two dots, that's an error !
-                    throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
                 }
 
                 nbValues++;
@@ -249,7 +249,7 @@ public class OID implements Serializable
         // We must have at least 2 ints
         if ( nbValues < 2 )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
         }
 
         oidValues = new long[nbValues];
@@ -272,13 +272,13 @@ public class OID implements Serializable
                 break;
 
             default: // error, this value is not allowed
-                throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+                throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
         }
 
         // We must have a dot
         if ( chars[pos++] != '.' )
         {
-            throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
         }
 
         dotSeen = true;
@@ -292,12 +292,12 @@ public class OID implements Serializable
                 if ( dotSeen )
                 {
                     // Two dots, that's an error !
-                    throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
                 }
 
                 if ( ituOrIso && value > 39 )
                 {
-                    throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
                 }
                 else
                 {
@@ -317,7 +317,7 @@ public class OID implements Serializable
             else
             {
                 // We don't have a number, this is an error
-                throw new DecoderException( I18n.err( I18n.ERR_INVALID_OID_00033, oid ) );
+                throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oid ) );
             }
         }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java Sun Sep  5 22:52:54 2010
@@ -59,12 +59,12 @@ public class BooleanDecoder
 
         if ( ( bytes == null ) || ( bytes.length == 0 ) )
         {
-            throw new BooleanDecoderException( I18n.err( I18n.ERR_0_BYTES_LONG_BOOLEAN_00034 ) );
+            throw new BooleanDecoderException( I18n.err( I18n.ERR_00034_0_BYTES_LONG_BOOLEAN ) );
         }
 
         if ( bytes.length != 1 )
         {
-            throw new BooleanDecoderException( I18n.err( I18n.ERR_N_BYTES_LONG_BOOLEAN_00035 ) );
+            throw new BooleanDecoderException( I18n.err( I18n.ERR_00035_N_BYTES_LONG_BOOLEAN ) );
         }
 
         if ( ( bytes[0] != 0 ) && ( bytes[0] != ( byte ) 0xFF ) )

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java Sun Sep  5 22:52:54 2010
@@ -64,12 +64,12 @@ public class IntegerDecoder
 
         if ( ( bytes == null ) || ( bytes.length == 0 ) )
         {
-            throw new IntegerDecoderException( I18n.err( I18n.ERR_0_BYTES_LONG_INTEGER_00036 ) );
+            throw new IntegerDecoderException( I18n.err( I18n.ERR_00036_0_BYTES_LONG_INTEGER ) );
         }
 
         if ( bytes.length > 4 )
         {
-            throw new IntegerDecoderException( I18n.err( I18n.ERR_ABOVE_4_BYTES_INTEGER_00037 ) );
+            throw new IntegerDecoderException( I18n.err( I18n.ERR_00037_ABOVE_4_BYTES_INTEGER ) );
         }
 
         for ( int i = 0; ( i < bytes.length ) && ( i < 5 ); i++ )
@@ -88,7 +88,7 @@ public class IntegerDecoder
         }
         else
         {
-            throw new IntegerDecoderException( I18n.err( I18n.ERR_VALUE_NOT_IN_RANGE_00038, min, max ) );
+            throw new IntegerDecoderException( I18n.err( I18n.ERR_00038_VALUE_NOT_IN_RANGE, min, max ) );
         }
     }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java (original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java Sun Sep  5 22:52:54 2010
@@ -64,12 +64,12 @@ public class LongDecoder
 
         if ( ( bytes == null ) || ( bytes.length == 0 ) )
         {
-            throw new LongDecoderException( I18n.err( I18n.ERR_0_BYTES_LONG_LONG_00039 ) );
+            throw new LongDecoderException( I18n.err( I18n.ERR_00039_0_BYTES_LONG_LONG ) );
         }
 
         if ( bytes.length > 8 )
         {
-            throw new LongDecoderException( I18n.err( I18n.ERR_0_BYTES_LONG_LONG_00039 ) );
+            throw new LongDecoderException( I18n.err( I18n.ERR_00039_0_BYTES_LONG_LONG ) );
         }
 
         for ( int i = 0; ( i < bytes.length ) && ( i < 9 ); i++ )
@@ -88,7 +88,7 @@ public class LongDecoder
         }
         else
         {
-            throw new LongDecoderException( I18n.err( I18n.ERR_VALUE_NOT_IN_RANGE_00038, min, max ) );
+            throw new LongDecoderException( I18n.err( I18n.ERR_00038_VALUE_NOT_IN_RANGE, min, max ) );
         }
     }
 

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java Sun Sep  5 22:52:54 2010
@@ -28,12 +28,14 @@ import org.apache.directory.shared.i18n.
  * Simple class that contains often used Cursor code.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param E The type of element on which this cursor will iterate
  */
 public abstract class AbstractCursor<E> implements Cursor<E>
 {
     /** The default associated monitor */
     private ClosureMonitor monitor = new DefaultClosureMonitor();
 
+
     /**
      * {@inheritDoc}
      */
@@ -41,18 +43,18 @@ public abstract class AbstractCursor<E> 
     {
         if ( monitor == null )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02001 ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02001_MONITOR ) );
         }
-        
+
         this.monitor = monitor;
     }
-    
+
 
     /**
-     * Check that the cursor is not closed.
+     * Check that the cursor is not closed before executing an operation.
      * 
-     * @param operation
-     * @throws Exception
+     * @param operation The operation we try to execute
+     * @throws Exception If there is a problem during the check
      */
     protected final void checkNotClosed( String operation ) throws Exception
     {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java Sun Sep  5 22:52:54 2010
@@ -29,47 +29,71 @@ import org.apache.directory.shared.i18n.
  * An abstract TupleCursor.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param K The key type for the Tuple
+ * @param V The associated Value type
  */
 public abstract class AbstractTupleCursor<K, V> implements TupleCursor<K, V>
 {
+    /** The default associated monitor */
     private ClosureMonitor monitor = new DefaultClosureMonitor();
 
 
+    /**
+     * {@inheritDoc}
+     */
     public final void setClosureMonitor( ClosureMonitor monitor )
     {
         if ( monitor == null )
         {
             throw new IllegalArgumentException( "monitor" );
         }
-        
+
         this.monitor = monitor;
     }
 
 
+    /**
+     * Check if the cursor is closed for the given operation
+     *
+     * @param operation The operation that will be applied if the cursor is not closed
+     * @throws Exception If there is an issue
+     */
     protected final void checkNotClosed( String operation ) throws Exception
     {
         monitor.checkNotClosed();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public final boolean isClosed()
     {
         return monitor.isClosed();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void close() throws Exception
     {
         monitor.close();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void close( Exception cause ) throws Exception
     {
         monitor.close( cause );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Iterator<Tuple<K, V>> iterator()
     {
         return new CursorIterator<Tuple<K, V>>( this );

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ClosureMonitor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ClosureMonitor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ClosureMonitor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ClosureMonitor.java Sun Sep  5 22:52:54 2010
@@ -35,7 +35,7 @@ public interface ClosureMonitor
      */
     void close();
 
-    
+
     /**
      * Sets monitor state to closed, and sets the cause to a 
      * CursorClosedException with a specific error message string.
@@ -43,8 +43,8 @@ public interface ClosureMonitor
      * @param cause error message string
      */
     void close( String cause );
-    
-    
+
+
     /**
      * Sets monitor state to closed, and sets the cause to a specific 
      * Exception.
@@ -52,16 +52,16 @@ public interface ClosureMonitor
      * @param cause the exception to associate with the closure
      */
     void close( Exception cause );
-    
-    
+
+
     /**
      * Gets whether the state of this ClosureMonitor is set to closed.
      *
      * @return true if state is closed, false if open
      */
     boolean isClosed();
-    
-    
+
+
     /**
      * Checks if state of this ClosureMonitor is set to closed and if so, 
      * throws the causing Exception.
@@ -69,8 +69,8 @@ public interface ClosureMonitor
      * @throws Exception the cause of the closure
      */
     void checkNotClosed() throws Exception;
-    
-    
+
+
     /**
      * Gets the cause of the closure.
      *

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java Sun Sep  5 22:52:54 2010
@@ -19,7 +19,6 @@
 package org.apache.directory.shared.ldap.cursor;
 
 
-
 /**
  * A Cursor for bidirectional traversal over elements in a dataSet. Cursors
  * unlike Iterators or Enumerations may advance to an element by calling
@@ -36,6 +35,7 @@ package org.apache.directory.shared.ldap
  * UnsupportedOperationExceptions.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param E The type of element on which this cursor will iterate
  */
 public interface Cursor<E> extends Iterable<E>
 {
@@ -46,6 +46,7 @@ public interface Cursor<E> extends Itera
      */
     boolean available();
 
+
     /**
      * Prepares this Cursor, so a subsequent call to Cursor#next() with a
      * true return value, will have positioned the Cursor on a dataSet 
@@ -60,7 +61,6 @@ public interface Cursor<E> extends Itera
      *
      * @param element the element to be positioned before
      * @throws Exception with problems accessing the underlying btree
-     * @throws UnsupportedOperationException if this method is not supported
      */
     void before( E element ) throws Exception;
 
@@ -79,7 +79,6 @@ public interface Cursor<E> extends Itera
      * @param element the element to be positioned after
      * @throws Exception if there are problems positioning this cursor or if
      * this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     void after( E element ) throws Exception;
 
@@ -89,7 +88,6 @@ public interface Cursor<E> extends Itera
      *
      * @throws Exception if there are problems positioning this cursor or if
      * this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     void beforeFirst() throws Exception;
 
@@ -99,7 +97,6 @@ public interface Cursor<E> extends Itera
      *
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     void afterLast() throws Exception;
 
@@ -111,7 +108,6 @@ public interface Cursor<E> extends Itera
      * element, false otherwise
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean first() throws Exception;
 
@@ -123,11 +119,10 @@ public interface Cursor<E> extends Itera
      * false otherwise
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean isFirst() throws Exception;
 
-    
+
     /**
      * Is this Cursor positioned before the first element.
      *
@@ -135,11 +130,10 @@ public interface Cursor<E> extends Itera
      * false otherwise
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean isBeforeFirst() throws Exception;
 
-    
+
     /**
      * Positions this Cursor at the last element.
      *
@@ -147,7 +141,6 @@ public interface Cursor<E> extends Itera
      * element, false otherwise
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean last() throws Exception;
 
@@ -159,11 +152,10 @@ public interface Cursor<E> extends Itera
      * false otherwise
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean isLast() throws Exception;
 
-    
+
     /**
      * Is this Cursor positioned after the last element.
      *
@@ -171,18 +163,16 @@ public interface Cursor<E> extends Itera
      * false otherwise
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean isAfterLast() throws Exception;
 
-    
+
     /**
      * Checks if this Cursor is closed.  Calls to this operation should not
      * fail with exceptions if and only if the cursor is in the closed state.
      *
      * @return true if this Cursor is closed, false otherwise
      * @throws Exception if there are problems determining the cursor's closed state
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean isClosed() throws Exception;
 
@@ -195,7 +185,6 @@ public interface Cursor<E> extends Itera
      *
      * @return true if the advance succeeded, false otherwise
      * @throws Exception if there are problems advancing to the next position
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean previous() throws Exception;
 
@@ -209,7 +198,6 @@ public interface Cursor<E> extends Itera
      * @return true if the advance succeeded, false otherwise
      * @throws Exception if there are problems advancing to this Cursor to
      * the next position, or if this Cursor is closed
-     * @throws UnsupportedOperationException if this method is not supported
      */
     boolean next() throws Exception;
 
@@ -262,8 +250,8 @@ public interface Cursor<E> extends Itera
      * @throws Exception if for some reason this Cursor could not be closed
      */
     void close( Exception reason ) throws Exception;
-    
-    
+
+
     /**
      * Sets a non-null closure monitor to associate with this Cursor.
      *

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorClosedException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorClosedException.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorClosedException.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorClosedException.java Sun Sep  5 22:52:54 2010
@@ -27,19 +27,28 @@ package org.apache.directory.shared.ldap
  */
 public class CursorClosedException extends Exception
 {
+    /** The serialVersion UID */
     private static final long serialVersionUID = -5723233489761854394L;
 
     /** A static exception to be used by the monitor */
     public static final CursorClosedException INSTANCE = new CursorClosedException();
 
 
+    /**
+     * Creates a new instance of CursorClosedException.
+     */
     public CursorClosedException()
     {
     }
 
 
-    public CursorClosedException( String s )
+    /**
+     * Creates a new instance of CursorClosedException.
+     *
+     * @param message The associated message
+     */
+    public CursorClosedException( String message )
     {
-        super( s );
+        super( message );
     }
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java Sun Sep  5 22:52:54 2010
@@ -35,13 +35,12 @@ public class CursorIterator<E> implement
 {
     /** The inner cursor we will iterate */
     private final Cursor<E> cursor;
-    
+
     /** A flag used to store the cursor state */
     private boolean available;
 
 
     /**
-     * 
      * Creates a new instance of CursorIterator.
      *
      * @param cursor The inner cursor
@@ -75,7 +74,7 @@ public class CursorIterator<E> implement
         }
         catch ( Exception e )
         {
-            throw new RuntimeException( I18n.err( I18n.ERR_02002 ), e );
+            throw new RuntimeException( I18n.err( I18n.ERR_02002_FAILURE_ON_UNDERLYING_CURSOR ), e );
         }
     }
 
@@ -85,6 +84,6 @@ public class CursorIterator<E> implement
      */
     public void remove()
     {
-        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02003 ) );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_02003_REMOVAL_NOT_SUPPORTED ) );
     }
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorStateEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorStateEnum.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorStateEnum.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorStateEnum.java Sun Sep  5 22:52:54 2010
@@ -28,28 +28,28 @@ public enum CursorStateEnum
 {
     /** the Cursor has been created and so has not been positioned yet */
     JUST_OPENED,
-    
+
     /** the Cursor is positioned just before the first element */
     BEFORE_FIRST,
-    
+
     /** the Cursor is positioned just after the last element */
     AFTER_LAST,
-    
+
     /** the Cursor is positioned just before an element but not on any element */
     BEFORE_INNER,
-    
+
     /** the Cursor is positioned just after an element but not on any element */
     AFTER_INNER,
-    
+
     /** the Cursor is positioned on the first element */
     ON_FIRST,
-    
+
     /** the Cursor is positioned on the last element */
     ON_LAST,
-    
+
     /** the Cursor is positioned on an element */
     ON_INNER,
-    
+
     /** the Cursor is closed and not operations can be performed on it */
     CLOSED
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java Sun Sep  5 22:52:54 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.directory.shared.ldap.cursor;
 
+
 import org.apache.directory.shared.i18n.I18n;
 
 
@@ -25,6 +26,7 @@ import org.apache.directory.shared.i18n.
  * An empty Cursor implementation.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param E The type of element on which this cursor will iterate
  */
 public class EmptyCursor<E> extends AbstractCursor<E>
 {
@@ -36,6 +38,7 @@ public class EmptyCursor<E> extends Abst
         return false;
     }
 
+
     /**
      * {@inheritDoc}
      */
@@ -118,7 +121,7 @@ public class EmptyCursor<E> extends Abst
     public E get() throws Exception
     {
         checkNotClosed( "get()" );
-        throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02004 ) );
+        throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02004_EMPTY_CURSOR ) );
     }
 
 

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InconsistentCursorStateException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InconsistentCursorStateException.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InconsistentCursorStateException.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InconsistentCursorStateException.java Sun Sep  5 22:52:54 2010
@@ -28,16 +28,25 @@ package org.apache.directory.shared.ldap
  */
 public class InconsistentCursorStateException extends Exception
 {
+    /** The serialVersion UID */
     private static final long serialVersionUID = 6222645005251534704L;
 
 
+    /**
+     * Creates a new instance of InconsistentCursorStateException.
+     */
     public InconsistentCursorStateException()
     {
     }
 
 
-    public InconsistentCursorStateException( String s )
+    /**
+     * Creates a new instance of CursorClosedException.
+     *
+     * @param message The associated message
+     */
+    public InconsistentCursorStateException( String message )
     {
-        super( s );
+        super( message );
     }
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InvalidCursorPositionException.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InvalidCursorPositionException.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InvalidCursorPositionException.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/InvalidCursorPositionException.java Sun Sep  5 22:52:54 2010
@@ -27,16 +27,25 @@ package org.apache.directory.shared.ldap
  */
 public class InvalidCursorPositionException extends Exception
 {
+    /** The serialVersion UID */
     private static final long serialVersionUID = 5730037129071653272L;
 
 
-    public InvalidCursorPositionException ()
+    /**
+     * Creates a new instance of InvalidCursorPositionException.
+     */
+    public InvalidCursorPositionException()
     {
     }
 
 
-    public InvalidCursorPositionException ( String s )
+    /**
+     * Creates a new instance of InvalidCursorPositionException.
+     *
+     * @param message The associated message
+     */
+    public InvalidCursorPositionException( String message )
     {
-        super( s );
+        super( message );
     }
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java Sun Sep  5 22:52:54 2010
@@ -32,6 +32,7 @@ import org.apache.directory.shared.i18n.
  * Cursor may be limited to a specific range within the list.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param E The element on which this cursor will iterate
  */
 public class ListCursor<E> extends AbstractCursor<E>
 {
@@ -72,19 +73,19 @@ public class ListCursor<E> extends Abstr
         }
         if ( ( start < 0 ) || ( start > list.size() ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02005, start ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02005_START_INDEX_OUT_OF_RANGE, start ) );
         }
 
         if ( ( end < 0 ) || ( end > list.size() ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02006, end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02006_END_INDEX_OUT_OF_RANGE, end ) );
         }
 
         // check list is not empty list since the empty list is the only situation
         // where we allow for start to equal the end: in other cases it makes no sense
         if ( ( list.size() > 0 ) && ( start >= end ) )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_02007, start, end ) );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_02007_START_INDEX_ABOVE_END_INDEX, start, end ) );
         }
 
         this.comparator = comparator;
@@ -476,7 +477,7 @@ public class ListCursor<E> extends Abstr
 
         if ( index < start || index >= end )
         {
-            throw new IOException( I18n.err( I18n.ERR_02009 ) );
+            throw new IOException( I18n.err( I18n.ERR_02009_CURSOR_NOT_POSITIONED ) );
         }
 
         return list.get( index );

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java Sun Sep  5 22:52:54 2010
@@ -28,6 +28,7 @@ import org.apache.directory.shared.i18n.
  * A Cursor over a single element.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param E The type of element on which this cursor will iterate
  */
 public class SingletonCursor<E> extends AbstractCursor<E>
 {
@@ -35,10 +36,10 @@ public class SingletonCursor<E> extends 
     private boolean beforeFirst = true;
     private boolean afterLast;
     private boolean onSingleton;
-    
+
     /** The comparator used for this cursor. */
     private final Comparator<E> comparator;
-    
+
     /** The unique element stored in the cursor */
     private final E singleton;
 
@@ -75,7 +76,7 @@ public class SingletonCursor<E> extends 
     {
         return onSingleton;
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -86,7 +87,7 @@ public class SingletonCursor<E> extends 
 
         if ( comparator == null )
         {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_02010 ) );
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_02010_NO_COMPARATOR_CANT_MOVE_BEFORE ) );
         }
 
         int comparison = comparator.compare( singleton, element );
@@ -111,7 +112,7 @@ public class SingletonCursor<E> extends 
 
         if ( comparator == null )
         {
-            throw new UnsupportedOperationException( I18n.err( I18n.ERR_02011 ) );
+            throw new UnsupportedOperationException( I18n.err( I18n.ERR_02011_NO_COMPARATOR_CANT_MOVE_AFTER ) );
         }
 
         int comparison = comparator.compare( singleton, element );
@@ -227,7 +228,7 @@ public class SingletonCursor<E> extends 
     public boolean previous() throws Exception
     {
         checkNotClosed( "()" );
-        
+
         if ( beforeFirst )
         {
             return false;
@@ -255,7 +256,7 @@ public class SingletonCursor<E> extends 
     public boolean next() throws Exception
     {
         checkNotClosed( "()" );
-        
+
         if ( beforeFirst )
         {
             beforeFirst = false;
@@ -283,7 +284,7 @@ public class SingletonCursor<E> extends 
     public E get() throws Exception
     {
         checkNotClosed( "()" );
-        
+
         if ( onSingleton )
         {
             return singleton;
@@ -291,11 +292,11 @@ public class SingletonCursor<E> extends 
 
         if ( beforeFirst )
         {
-            throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02012 ) );
+            throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02012_CANNOT_ACCESS_IF_BEFORE_FIRST ) );
         }
         else
         {
-            throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02013 ) );
+            throw new InvalidCursorPositionException( I18n.err( I18n.ERR_02013_CANNOT_ACCESS_IF_AFTER_LAST ) );
         }
     }
 

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java Sun Sep  5 22:52:54 2010
@@ -24,11 +24,14 @@ package org.apache.directory.shared.ldap
  * A key/value tuple for simple two column persistent Tables with sorted keys.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param K The key type for the Tuple
+ * @param V The associated Value type
  */
 public class Tuple<K, V>
 {
     /** the key for this Tuple */
     private K key;
+
     /** the value for this Tuple */
     private V value;
 
@@ -75,6 +78,7 @@ public class Tuple<K, V>
     public Tuple<K, V> setKey( K key )
     {
         this.key = key;
+
         return this;
     }
 
@@ -99,6 +103,7 @@ public class Tuple<K, V>
     public Tuple<K, V> setValue( V value )
     {
         this.value = value;
+
         return this;
     }
 
@@ -116,6 +121,7 @@ public class Tuple<K, V>
     {
         this.key = key;
         this.value = value;
+
         return this;
     }
 
@@ -132,21 +138,45 @@ public class Tuple<K, V>
     {
         this.key = tupleToCopy.key;
         this.value = tupleToCopy.value;
+
         return this;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public int hashCode()
     {
-        final int prime = 31;
+        int prime = 31;
         int result = 1;
-        result = prime * result + ( ( key == null ) ? 0 : key.hashCode() );
-        result = prime * result + ( ( value == null ) ? 0 : value.hashCode() );
+
+        if ( key == null )
+        {
+            result = prime * result;
+        }
+        else
+        {
+            result = prime * result + key.hashCode();
+        }
+
+        if ( value == null )
+        {
+            result = prime * result;
+        }
+        else
+        {
+            result = prime * result + value.hashCode();
+        }
+
         return result;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     public boolean equals( Object obj )
     {
@@ -154,15 +184,19 @@ public class Tuple<K, V>
         {
             return true;
         }
+
         if ( obj == null )
         {
             return false;
         }
+
         if ( getClass() != obj.getClass() )
         {
             return false;
         }
-        Tuple<?, ?> other = (org.apache.directory.shared.ldap.cursor.Tuple<?, ?> ) obj;
+
+        Tuple<?, ?> other = ( org.apache.directory.shared.ldap.cursor.Tuple<?, ?> ) obj;
+
         if ( key == null )
         {
             if ( other.key != null )
@@ -174,6 +208,7 @@ public class Tuple<K, V>
         {
             return false;
         }
+
         if ( value == null )
         {
             if ( other.value != null )
@@ -185,18 +220,24 @@ public class Tuple<K, V>
         {
             return false;
         }
+
         return true;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString()
     {
         StringBuilder buf = new StringBuilder();
+
         buf.append( "Tuple( '" );
         buf.append( key );
         buf.append( "', '" );
         buf.append( value );
         buf.append( "' )" );
+
         return buf.toString();
     }
 }

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java (original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java Sun Sep  5 22:52:54 2010
@@ -20,13 +20,13 @@
 package org.apache.directory.shared.ldap.cursor;
 
 
-
-
 /**
  * A Cursor introducing new advance methods designed to reduce some
  * inefficiencies encountered when scanning over Tuples.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param K The Tupe key type
+ * @param V The Value type stored in the Tuple
  */
 public interface TupleCursor<K, V> extends Cursor<Tuple<K, V>>
 {
@@ -37,7 +37,7 @@ public interface TupleCursor<K, V> exten
      * before the first value of the key.
      *
      * @param key the key to advance just before
-     * @throws Exception if there are faults peforming this operation
+     * @throws Exception if there are faults performing this operation
      */
     void beforeKey( K key ) throws Exception;
 
@@ -49,7 +49,7 @@ public interface TupleCursor<K, V> exten
      * after the last value of the key.
      *
      * @param key the key to advance just after the last value
-     * @throws Exception if there are faults peforming this operation
+     * @throws Exception if there are faults performing this operation
      */
     void afterKey( K key ) throws Exception;
 
@@ -65,8 +65,7 @@ public interface TupleCursor<K, V> exten
      *
      * @param key the key of the value to advance just before
      * @param value the value to advance just before
-     * @throws UnsupportedOperationException if duplicate keys not supporrted
-     * @throws Exception if there are faults peforming this operation
+     * @throws Exception if there are faults performing this operation
      */
     void beforeValue( K key, V value ) throws Exception;
 
@@ -81,8 +80,7 @@ public interface TupleCursor<K, V> exten
      *
      * @param key the key of the value to advance just after
      * @param value the value to advance just after
-     * @throws UnsupportedOperationException if duplicate keys not supporrted
-     * @throws Exception if there are faults peforming this operation
+     * @throws Exception if there are faults performing this operation
      */
     void afterValue( K key, V value ) throws Exception;
 }

Modified: directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java?rev=992908&r1=992907&r2=992908&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java (original)
+++ directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java Sun Sep  5 22:52:54 2010
@@ -35,64 +35,61 @@ import java.util.ResourceBundle;
 public enum I18n
 {
     // asn1
-    ERR_BAD_TRANSITION_FROM_STATE_00001( "ERR_BAD_TRANSITION_FROM_STATE_00001" ),
-    ERR_BAD_TRANSITION_00002( "ERR_BAD_TRANSITION_00002" ),
-    ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003( "ERR_CANNOT_PUT_PDU_IN_NULL_BUFFER_00003" ),
-    ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004( "ERR_PDU_BUFFER_SIZE_TOO_SMALL_00004" ),
-    ERR_LENGTH_OVERFLOW_00005( "ERR_LENGTH_OVERFLOW_00005" ),
-    ERR_LENGTH_EXTENSION_RESERVED_00006( "ERR_LENGTH_EXTENSION_RESERVED_00006" ),
-    ERR_TLV_NULL_00007( "ERR_TLV_NULL_00007" ),
-    ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_00008( "ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_00008" ),
-    ERR_MORE_TLV_EXPECTED_00009( "ERR_MORE_TLV_EXPECTED_00009" ),
-    ERR_TRUNCATED_PDU_00010( "ERR_TRUNCATED_PDU_00010" ),
-    ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011( "ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011" ),
-    ERR_ODD_NUM_OF_CHARS_00013( "ERR_ODD_NUM_OF_CHARS_00013" ),
-    ERR_ILLEGAL_HEX_CHAR_00014( "ERR_ILLEGAL_HEX_CHAR_00014" ),
-    ERR_END_OF_STREAM_00016( "ERR_END_OF_STREAM_00016" ),
-    ERR_EOF_FOUND_LENGTH_EXPECTED_00017( "ERR_EOF_FOUND_LENGTH_EXPECTED_00017" ),
-    ERR_DER_LENGTH_ABOVE_4_BYTES_00018( "ERR_DER_LENGTH_ABOVE_4_BYTES_00018" ),
-    ERR_EOF_FOUND_IN_LENGTH_00019( "ERR_EOF_FOUND_IN_LENGTH_00019" ),
-    ERR_CORRUPTED_STREAM_00020( "ERR_CORRUPTED_STREAM_00020" ),
-    ERR_EOF_FOUND_IN_OBJECT_00021( "ERR_EOF_FOUND_IN_OBJECT_00021" ),
-    ERR_READ_PAST_END_OF_FILE_00022( "ERR_READ_PAST_END_OF_FILE_00022" ),
-    ERR_UNKNOWN_BER_OBJECT_00023( "ERR_UNKNOWN_BER_OBJECT_00023" ),
-    ERR_OBJECT_NOT_DER_ENCODABLE_00024( "ERR_OBJECT_NOT_DER_ENCODABLE_00024" ),
-    ERR_DER_OCTET_STRING_EXPECTED_00025( "ERR_DER_OCTET_STRING_EXPECTED_00025" ),
-    ERR_CANNOT_CONVERT_OCTETS_00026( "ERR_CANNOT_CONVERT_OCTETS_00026" ),
-    ERR_NOT_IMPLEMENTED_00027( "ERR_NOT_IMPLEMENTED_00027" ),
-    ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028( "ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028" ),
-    ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029( "ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029" ),
-    ERR_BIT_NUMBER_OUT_OF_BOUND_00030( "ERR_BIT_NUMBER_OUT_OF_BOUND_00030" ),
-    ERR_CANNOT_FIND_BIT_00031( "ERR_CANNOT_FIND_BIT_00031" ),
-    ERR_NULL_OID_00032( "ERR_NULL_OID_00032" ),
-    ERR_INVALID_OID_00033( "ERR_INVALID_OID_00033" ),
-    ERR_0_BYTES_LONG_BOOLEAN_00034( "ERR_0_BYTES_LONG_BOOLEAN_00034" ),
-    ERR_N_BYTES_LONG_BOOLEAN_00035( "ERR_N_BYTES_LONG_BOOLEAN_00035" ),
-    ERR_0_BYTES_LONG_INTEGER_00036( "ERR_0_BYTES_LONG_INTEGER_00036" ),
-    ERR_ABOVE_4_BYTES_INTEGER_00037( "ERR_ABOVE_4_BYTES_INTEGER_00037" ),
-    ERR_VALUE_NOT_IN_RANGE_00038( "ERR_VALUE_NOT_IN_RANGE_00038" ),
-    ERR_0_BYTES_LONG_LONG_00039( "ERR_0_BYTES_LONG_LONG_00039" ),
-    ERR_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH_00041( "ERR_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH_00041" ),
-    ERR_PDU_SIZE_TOO_LONG_00042( "ERR_PDU_SIZE_TOO_LONG_00042" ),
-    ERR_REMAINING_BYTES_FOR_DECODED_PDU_00043( "ERR_REMAINING_BYTES_FOR_DECODED_PDU_00043" ),
-
-    // asn1-codec
-    ERR_01001( "ERR_01001" ),
+    ERR_00001_BAD_TRANSITION_FROM_STATE( "ERR_00001_BAD_TRANSITION_FROM_STATE" ),
+    ERR_00002_BAD_TRANSITION( "ERR_00002_BAD_TRANSITION" ),
+    ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER( "ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER" ),
+    ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL( "ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL" ),
+    ERR_00005_LENGTH_OVERFLOW( "ERR_00005_LENGTH_OVERFLOW" ),
+    ERR_00006_LENGTH_EXTENSION_RESERVED( "ERR_00006_LENGTH_EXTENSION_RESERVED" ),
+    ERR_00007_TLV_NULL( "ERR_00007_TLV_NULL" ),
+    ERR_00008_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH( "ERR_00008_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH" ),
+    ERR_00009_MORE_TLV_EXPECTED( "ERR_00009_MORE_TLV_EXPECTED" ),
+    ERR_00010_TRUNCATED_PDU( "ERR_00010_TRUNCATED_PDU" ),
+    ERR_00011_LENGTH_TOO_LONG_FOR_DEFINITE_FORM( "ERR_00011_LENGTH_TOO_LONG_FOR_DEFINITE_FORM" ),
+    ERR_00013_ODD_NUM_OF_CHARS( "ERR_00013_ODD_NUM_OF_CHARS" ),
+    ERR_00014_ILLEGAL_HEX_CHAR( "ERR_00014_ILLEGAL_HEX_CHAR" ),
+    ERR_00016_END_OF_STREAM( "ERR_00016_END_OF_STREAM" ),
+    ERR_00017_EOF_FOUND_LENGTH_EXPECTED( "ERR_00017_EOF_FOUND_LENGTH_EXPECTED" ),
+    ERR_00018_DER_LENGTH_ABOVE_4_BYTES( "ERR_00018_DER_LENGTH_ABOVE_4_BYTES" ),
+    ERR_00019_EOF_FOUND_IN_LENGTH( "ERR_00019_EOF_FOUND_IN_LENGTH" ),
+    ERR_00020_CORRUPTED_STREAM( "ERR_00020_CORRUPTED_STREAM" ),
+    ERR_00021_EOF_FOUND_IN_OBJECT( "ERR_00021_EOF_FOUND_IN_OBJECT" ),
+    ERR_00022_READ_PAST_END_OF_FILE( "ERR_00022_READ_PAST_END_OF_FILE" ),
+    ERR_00023_UNKNOWN_BER_OBJECT( "ERR_00023_UNKNOWN_BER_OBJECT" ),
+    ERR_00024_OBJECT_NOT_DER_ENCODABLE( "ERR_00024_OBJECT_NOT_DER_ENCODABLE" ),
+    ERR_00025_DER_OCTET_STRING_EXPECTED( "ERR_DER_OCTET_STRING_EXPECTED_00025" ),
+    ERR_00026_CANNOT_CONVERT_OCTETS( "ERR_00026_CANNOT_CONVERT_OCTETS" ),
+    ERR_00027_NOT_IMPLEMENTED( "ERR_00027_NOT_IMPLEMENTED" ),
+    ERR_00028_INTERNAL_ERROR_ENCODING_BITSTRING( "ERR_00028_INTERNAL_ERROR_ENCODING_BITSTRING" ),
+    ERR_00029_NULL_OR_NEG_LENGTH_NOT_ALLOWED( "ERR_00029_NULL_OR_NEG_LENGTH_NOT_ALLOWED" ),
+    ERR_00030_BIT_NUMBER_OUT_OF_BOUND( "ERR_00030_BIT_NUMBER_OUT_OF_BOUND" ),
+    ERR_00031_CANNOT_FIND_BIT( "ERR_00031_CANNOT_FIND_BIT" ),
+    ERR_00032_NULL_OID( "ERR_00032_NULL_OID" ),
+    ERR_00033_INVALID_OID( "ERR_00033_INVALID_OID" ),
+    ERR_00034_0_BYTES_LONG_BOOLEAN( "ERR_00034_0_BYTES_LONG_BOOLEAN" ),
+    ERR_00035_N_BYTES_LONG_BOOLEAN( "ERR_00035_N_BYTES_LONG_BOOLEAN" ),
+    ERR_00036_0_BYTES_LONG_INTEGER( "ERR_00036_0_BYTES_LONG_INTEGER" ),
+    ERR_00037_ABOVE_4_BYTES_INTEGER( "ERR_00037_ABOVE_4_BYTES_INTEGER" ),
+    ERR_00038_VALUE_NOT_IN_RANGE( "ERR_00038_VALUE_NOT_IN_RANGE" ),
+    ERR_00039_0_BYTES_LONG_LONG( "ERR_00039_0_BYTES_LONG_LONG" ),
+    ERR_00041_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH( "ERR_00041_CURRENT_LENGTH_EXCEED_EXPECTED_LENGTH" ),
+    ERR_00042_PDU_SIZE_TOO_LONG( "ERR_00042_PDU_SIZE_TOO_LONG" ),
+    ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU( "ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU" ),
 
     // cursor
-    ERR_02001( "ERR_02001" ),
-    ERR_02002( "ERR_02002" ),
-    ERR_02003( "ERR_02003" ),
-    ERR_02004( "ERR_02004" ),
-    ERR_02005( "ERR_02005" ),
-    ERR_02006( "ERR_02006" ),
-    ERR_02007( "ERR_02007" ),
+    ERR_02001_MONITOR( "ERR_02001_MONITOR" ),
+    ERR_02002_FAILURE_ON_UNDERLYING_CURSOR( "ERR_02002_FAILURE_ON_UNDERLYING_CURSOR" ),
+    ERR_02003_REMOVAL_NOT_SUPPORTED( "ERR_02003_REMOVAL_NOT_SUPPORTED" ),
+    ERR_02004_EMPTY_CURSOR( "ERR_02004_EMPTY_CURSOR" ),
+    ERR_02005_START_INDEX_OUT_OF_RANGE( "ERR_02005_START_INDEX_OUT_OF_RANGE" ),
+    ERR_02006_END_INDEX_OUT_OF_RANGE( "ERR_02006_END_INDEX_OUT_OF_RANGE" ),
+    ERR_02007_START_INDEX_ABOVE_END_INDEX( "ERR_02007_START_INDEX_ABOVE_END_INDEX" ),
     ERR_02008( "ERR_02008" ),
-    ERR_02009( "ERR_02009" ),
-    ERR_02010( "ERR_02010" ),
-    ERR_02011( "ERR_02011" ),
-    ERR_02012( "ERR_02012" ),
-    ERR_02013( "ERR_02013" ),
+    ERR_02009_CURSOR_NOT_POSITIONED( "ERR_02009_CURSOR_NOT_POSITIONED" ),
+    ERR_02010_NO_COMPARATOR_CANT_MOVE_BEFORE( "ERR_02010_NO_COMPARATOR_CANT_MOVE_BEFORE" ),
+    ERR_02011_NO_COMPARATOR_CANT_MOVE_AFTER( "ERR_02011_NO_COMPARATOR_CANT_MOVE_AFTER" ),
+    ERR_02012_CANNOT_ACCESS_IF_BEFORE_FIRST( "ERR_02012_CANNOT_ACCESS_IF_BEFORE_FIRST" ),
+    ERR_02013_CANNOT_ACCESS_IF_AFTER_LAST( "ERR_02013_CANNOT_ACCESS_IF_AFTER_LAST" ),
     ERR_02014_UNSUPPORTED_OPERATION( "ERR_02014_UNSUPPORTED_OPERATION" ),
 
     // dsml-parser



Mime
View raw message