directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r912399 [3/4] - in /directory/shared/trunk: ./ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/ ...
Date Sun, 21 Feb 2010 20:52:35 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Sun Feb 21 20:52:31 2010
@@ -38,6 +38,7 @@
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
 import org.apache.directory.shared.ldap.codec.actions.AttributeDescAction;
 import org.apache.directory.shared.ldap.codec.actions.ControlValueAction;
@@ -176,10 +177,10 @@
                     // The Length should not be null
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The LdapMessage has a zero length. This is not allowed" );
+                        log.error( I18n.err( I18n.ERR_04066 ) );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The LdapMessage should not be empty" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
                     }
 
                     return;
@@ -214,10 +215,10 @@
                     // The Length should not be null
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The messageId has a zero length. This is not allowed" );
+                        log.error( I18n.err( I18n.ERR_04068 ) );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The messageId should not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04069 ) );
                     }
 
                     Value value = tlv.getValue();
@@ -235,8 +236,8 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The Message Id " + StringTools.dumpBytes( value.getData() ) + " is invalid : "
-                            + ide.getMessage() + ". The message ID must be between (0 .. 2 147 483 647)" );
+                        log.error( I18n.err( I18n.ERR_04070, StringTools.dumpBytes( value.getData() ), 
+                        		ide.getLocalizedMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR                        
                         throw new DecoderException( ide.getMessage() );
@@ -298,11 +299,10 @@
                     // The Length should be null
                     if ( expectedLength != 0 )
                     {
-                        log.error( "The length of a UnBindRequest must be null, the actual value is {}", Integer
-                            .valueOf( expectedLength ) );
+                        log.error( I18n.err( I18n.ERR_04071, Integer.valueOf( expectedLength ) ) );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The length of a UnBindRequest must be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04072 ) );
                     }
 
                     
@@ -355,7 +355,7 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The entry must not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04073 ) );
                     }
                     else
                     {
@@ -368,9 +368,9 @@
                         }
                         catch ( InvalidNameException ine )
                         {
-                            String msg = "The DN to delete : " + dnStr + " ("
-                                + StringTools.dumpBytes( dnBytes ) + ") is invalid";
-                            log.error( "{} : {}", msg, ine.getMessage() );
+                            String msg = I18n.err( I18n.ERR_04074, dnStr, StringTools.dumpBytes( dnBytes ),
+                            		ine.getLocalizedMessage() );
+                            log.error( msg );
 
                             DeleteResponseImpl response = new DeleteResponseImpl( delRequest.getMessageId() );
                             throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
@@ -429,7 +429,7 @@
 
                     if ( ( value == null ) || ( value.getData() == null ) )
                     {
-                        String msg = "The AbandonRequest messageId must not be null";
+                        String msg = I18n.err( I18n.ERR_04075 );
                         log.error( msg );
 
                         // This will generate a PROTOCOL_ERROR
@@ -455,9 +455,7 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The Abandonned Message Id {} is invalid : {}."
-                            + " The message ID must be between (0 .. 2 147 483 647)", StringTools.dumpBytes( value
-                            .getData() ), ide.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04076, StringTools.dumpBytes( value.getData() ), ide.getMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR
                         throw new DecoderException( ide.getMessage() );
@@ -501,7 +499,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The BindRequest must not be null";
+                        String msg = I18n.err( I18n.ERR_04077 );
                         log.error( msg );
 
                         // This will generate a PROTOCOL_ERROR
@@ -547,8 +545,7 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The version {} is invalid : {}. The version must be between (0 .. 127)",
-                            StringTools.dumpBytes( value.getData() ), ide.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04078, StringTools.dumpBytes( value.getData() ), ide.getMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR
                         throw new DecoderException( ide.getMessage() );
@@ -705,7 +702,7 @@
                     // We will check that the sasl is not null
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The SaslCredential must not be null";
+                        String msg = I18n.err( I18n.ERR_04079 );
                         log.error( msg );
 
                         BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() );
@@ -1048,7 +1045,7 @@
                     // sasl credentials
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The Referrals must not be null";
+                        String msg = I18n.err( I18n.ERR_04080 );
                         log.error( msg );
 
                         // This will generate a PROTOCOL_ERROR
@@ -1259,7 +1256,7 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // The type can't be null
-                        String msg = "The AttributeType can't be empty";
+                        String msg = I18n.err( I18n.ERR_04081 );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -1556,8 +1553,7 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        String msg = "Invalid operation ( " + StringTools.dumpBytes( tlv.getValue().getData() )
-                            + "), it should be 0, 1 or 2";
+                        String msg = I18n.err( I18n.ERR_04082, StringTools.dumpBytes( tlv.getValue().getData() ) );
                         log.error( msg );
 
                         // This will generate a PROTOCOL_ERROR
@@ -1635,7 +1631,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The type can't be null";
+                        String msg = I18n.err( I18n.ERR_04083 );
                         log.error( msg );
 
                         ModifyResponseImpl response = new ModifyResponseImpl( modifyRequest.getMessageId() );
@@ -1860,7 +1856,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The AddRequest must not be null";
+                        String msg = I18n.err( I18n.ERR_04084 );
                         log.error( msg );
 
                         // Will generate a PROTOCOL_ERROR
@@ -1892,7 +1888,7 @@
                     // Store the entry. It can't be null
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "Empty entry DN given";
+                        String msg = I18n.err( I18n.ERR_04085 );
                         log.error( msg );
 
                         AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );
@@ -1977,7 +1973,7 @@
                     // Store the type. It can't be null.
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "Null or empty types are not allowed";
+                        String msg = I18n.err( I18n.ERR_04086 );
                         log.error( msg );
 
                         AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );
@@ -1994,7 +1990,7 @@
                     }
                     catch ( NamingException ne )
                     {
-                        String msg = "Error while injecting the AttributeType";
+                        String msg = I18n.err( I18n.ERR_04087 );
                         log.error( msg );
 
                         AddResponseImpl response = new AddResponseImpl( addRequest.getMessageId() );
@@ -2092,7 +2088,7 @@
 
                     if ( expectedLength == 0 )
                     {
-                        String msg = "The AddResponse must not be null";
+                        String msg = I18n.err( I18n.ERR_04088 );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -2206,7 +2202,7 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The entry must nut be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04089 ) );
                     }
                     else
                     {
@@ -2270,7 +2266,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The newrdn must not be null";
+                        String msg = I18n.err( I18n.ERR_04090 );
                         log.error( msg );
 
                         ModifyDnResponseImpl response = new ModifyDnResponseImpl( modifyDNRequest.getMessageId() );
@@ -2342,8 +2338,7 @@
                     }
                     catch ( BooleanDecoderException bde )
                     {
-                        log.error( "The oldRDN flag {} is invalid : {}. It should be 0 or 255", StringTools
-                            .dumpBytes( value.getData() ), bde.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04091, StringTools.dumpBytes( value.getData() ), bde.getMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR                        
                         throw new DecoderException( bde.getMessage() );
@@ -2397,8 +2392,7 @@
                         if ( modifyDNRequest.isDeleteOldRDN() )
                         {
                             // This will generate a PROTOCOL_ERROR
-                            throw new DecoderException(
-                                "The new superior must nut be null if the flag 'delete old DN' is set to true" );
+                            throw new DecoderException( I18n.err( I18n.ERR_04092 ) );
                         }
                         else
                         {
@@ -2561,7 +2555,7 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The entry must not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04089 ) );
                     }
                     else
                     {
@@ -2635,7 +2629,7 @@
                     // DN
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The attribute description must not be null";
+                        String msg = I18n.err( I18n.ERR_04093 );
                         log.error( msg );
                         CompareResponseImpl response = new CompareResponseImpl( compareRequest.getMessageId() );
 
@@ -2750,7 +2744,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        String msg = "The CompareResponse must not be null";
+                        String msg = I18n.err( I18n.ERR_04094 );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -2882,9 +2876,9 @@
                     // OID
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The name must not be null" );
+                        log.error( I18n.err( I18n.ERR_04095 ) );
                         // This will generate a PROTOCOL_ERROR                        
-                        throw new DecoderException( "The name must not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04095 ) );
                     }
                     else
                     {
@@ -3251,9 +3245,9 @@
                     // OID.
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The name must not be null" );
+                        log.error( I18n.err( I18n.ERR_04095 ) );
                         // This will generate a PROTOCOL_ERROR                        
-                        throw new DecoderException( "The name must not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04095 ) );
                     }
                     else
                     {
@@ -3413,10 +3407,10 @@
                 // The Length should be null
                 if ( expectedLength == 0 )
                 {
-                    log.error( "The length of a control must not be null" );
+                    log.error( I18n.err( I18n.ERR_04096 ) );
 
                     // This will generate a PROTOCOL_ERROR
-                    throw new DecoderException( "The length of a control must not be null" );
+                    throw new DecoderException( I18n.err( I18n.ERR_04096 ) );
                 }
             }
         };
@@ -3457,10 +3451,10 @@
                     // We have to handle the special case of a 0 length OID
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The OID must not be null" );
+                        log.error( I18n.err( I18n.ERR_04097 ) );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "The OID must not be null" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04097 ) );
                     }
 
                     byte[] value = tlv.getValue().getData();
@@ -3469,10 +3463,10 @@
                     // The OID is encoded as a String, not an Object Id
                     if ( !OID.isOID( oidValue ) )
                     {
-                        log.error( "The control type " + StringTools.dumpBytes( value ) + " is not a valid OID" );
+                        log.error( I18n.err( I18n.ERR_04098, StringTools.dumpBytes( value ) ) );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "Invalid control OID : " + oidValue );
+                        throw new DecoderException( I18n.err( I18n.ERR_04099, oidValue ) );
                     }
                     
                     // get the Control for this OID
@@ -3535,8 +3529,7 @@
                     }
                     catch ( BooleanDecoderException bde )
                     {
-                        log.error( "The control criticality flag " + StringTools.dumpBytes( value.getData() )
-                            + " is invalid : " + bde.getMessage() + ". It should be 0 or 255" );
+                        log.error( I18n.err( I18n.ERR_04100, StringTools.dumpBytes( value.getData() ), bde.getMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR
                         throw new DecoderException( bde.getMessage() );
@@ -3723,8 +3716,8 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The scope is not in [0..2] : {}", value.toString() );
-                        throw new DecoderException( "The scope is not in [0..2] : " + value.toString() );
+                        log.error( I18n.err( I18n.ERR_04101, value.toString() ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04101,  value.toString() ) );
                     }
 
                     searchRequest.setScope( SearchScope.getSearchScope( scope ) );
@@ -3787,8 +3780,8 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The derefAlias is not in [0..3] : {}", value.toString() );
-                        throw new DecoderException( "The derefAlias is not in [0..3] : " + value.toString() );
+                        log.error( I18n.err( I18n.ERR_04102, value.toString() ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04102, value.toString() ) );
                     }
 
                     searchRequest.setDerefAliases( derefAliases );
@@ -3850,8 +3843,8 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The sizeLimit is not a valid Integer: {}", value.toString() );
-                        throw new DecoderException( "The sizeLimit is not a valid Integer: " + value.toString() );
+                        log.error( I18n.err( I18n.ERR_04103, value.toString() ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04103, value.toString() ) );
                     }
 
                     searchRequest.setSizeLimit( sizeLimit );
@@ -3898,8 +3891,8 @@
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( "The timeLimit is not a valid Integer: {}", value.toString() );
-                        throw new DecoderException( "The timeLimit is not a valid Integer: " + value.toString() );
+                        log.error( I18n.err( I18n.ERR_04104, value.toString() ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04104, value.toString() ) );
                     }
 
                     searchRequest.setTimeLimit( timeLimit );
@@ -3948,8 +3941,7 @@
                     }
                     catch ( BooleanDecoderException bde )
                     {
-                        log.error( "The types only flag {} is invalid : {}. It should be 0 or 255", StringTools
-                            .dumpBytes( value.getData() ), bde.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04105, StringTools.dumpBytes( value.getData() ), bde.getMessage() ) );
 
                         throw new DecoderException( bde.getMessage() );
                     }
@@ -5086,8 +5078,8 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The attribute description should not be null" );
-                        throw new DecoderException( "The attribute description should not be null" );
+                        log.error( I18n.err( I18n.ERR_04106 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04106 ) );
                     }
                     else
                     {
@@ -5127,7 +5119,7 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The substrings sequence is empty" );
+                        log.error( I18n.err( I18n.ERR_04107 ) );
                         throw new DecoderException( "The substring sequence is empty" );
                     }
                 }
@@ -5159,8 +5151,8 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The substring initial filter is empty" );
-                        throw new DecoderException( "The substring initial filter is empty" );
+                        log.error( I18n.err( I18n.ERR_04108 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04108 ) );
                     }
 
                     substringFilter.setInitialSubstrings( StringTools.utf8ToString( tlv.getValue().getData() ) );
@@ -6080,10 +6072,10 @@
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( "The matching rule is empty" );
+                        log.error( I18n.err( I18n.ERR_04109 ) );
 
                         // It will generate a PROTOCOL_ERROR
-                        throw new DecoderException( "Invalid matching rule : it can't be empty" );
+                        throw new DecoderException( I18n.err( I18n.ERR_04109 ) );
                     }
                     else
                     {
@@ -6218,8 +6210,7 @@
                     }
                     catch ( BooleanDecoderException bde )
                     {
-                        log.error( "The DN attributes flag {} is invalid : {}. It should be 0 or 255", StringTools
-                            .dumpBytes( value.getData() ), bde.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04110, StringTools.dumpBytes( value.getData() ), bde.getMessage() ) );
 
                         throw new DecoderException( bde.getMessage() );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -22,6 +22,7 @@
 import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 
 
 
@@ -116,7 +117,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultCodec.java Sun Feb 21 20:52:31 2010
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -305,7 +306,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -317,7 +318,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The matchedDN

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java Sun Feb 21 20:52:31 2010
@@ -29,6 +29,7 @@
 import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
 import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
 import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
@@ -248,8 +249,7 @@
         }
         catch ( InvalidNameException e )
         {
-            LOG.error( "Could not parse matchedDN while transforming Codec value to Internal: {}", 
-                codecLdapResult.getMatchedDN() );
+            LOG.error( I18n.err( I18n.ERR_04111, codecLdapResult.getMatchedDN() ) );
             internalLdapResult.setMatchedDn( new LdapDN() );
         }
         
@@ -597,7 +597,7 @@
                         }
                         catch ( DecoderException de )
                         {
-                            LOG.error( "Error while transforming a ExprNode : " + de.getMessage() );
+                            LOG.error( I18n.err( I18n.ERR_04112, de.getLocalizedMessage() ) );
                             return null;
                         }
                     }
@@ -876,7 +876,7 @@
 
 
             default:
-                throw new IllegalStateException( "shouldn't happen - if it does then we have issues" );
+                throw new IllegalStateException( I18n.err( I18n.ERR_04113 ) );
         }
 
         // Transform the controls, too

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -157,7 +158,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            String msg = "The PDU buffer size is too small !";
+            String msg = I18n.err( I18n.ERR_04005 );
             LOGGER.error( msg );
             throw new EncoderException( msg );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.AndFilter;
 import org.apache.directory.shared.ldap.codec.search.Filter;
@@ -62,8 +63,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The And filter PDU must not be empty" );
-            throw new DecoderException( "The And filter PDU must not be empty" );
+            log.error( I18n.err( I18n.ERR_04006 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04006 ) );
         }
 
         SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
@@ -66,8 +67,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The attribute description is empty " );
-            throw new DecoderException( "The type can't be null" );
+            log.error( I18n.err( I18n.ERR_04007 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04007 ) );
         }
         else
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.Filter;
 import org.apache.directory.shared.ldap.codec.search.NotFilter;
@@ -62,8 +63,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The Not filter PDU must not be empty" );
-            throw new DecoderException( "The Not filter PDU must not be empty" );
+            log.error( I18n.err( I18n.ERR_04009 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04009 ) );
         }
 
         SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.Filter;
 import org.apache.directory.shared.ldap.codec.search.OrFilter;
@@ -62,8 +63,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The Or filter PDU must not be empty" );
-            throw new DecoderException( "The Or filter PDU must not be empty" );
+            log.error( I18n.err( I18n.ERR_04010 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04010 ) );
         }
 
         SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitReferralsAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
@@ -65,7 +66,7 @@
         // sasl credentials
         if ( tlv.getLength() == 0 )
         {
-            String msg = "The Referrals must not be null";
+            String msg = I18n.err( I18n.ERR_04011 );
             log.error( msg );
          
             // This will generate a PROTOCOL_ERROR

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.Filter;
 import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
@@ -65,8 +66,8 @@
 
         if ( expectedLength == 0 )
         {
-            log.error( "The Substring filter PDU must not be empty" );
-            throw new DecoderException( "The Substring filter PDU must not be empty" );
+            log.error( I18n.err( I18n.ERR_04012 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04012 ) );
         }
 
         // We can allocate the SearchRequest

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
@@ -96,12 +97,10 @@
                     catch ( InvalidNameException ine )
                     {
                         // This is for the client side. We will never decode LdapResult on the server
-                        String msg = "Incorrect DN given : " + dnStr + 
-                            " (" + StringTools.dumpBytes( dnBytes )
-                            + ") is invalid";
-                        log.error( "{} : {}", msg, ine.getMessage() );
+                        String msg = I18n.err( I18n.ERR_04013, dnStr, StringTools.dumpBytes( dnBytes ), ine.getLocalizedMessage() );
+                        log.error( msg );
                     
-                        throw new DecoderException( "Incorrect DN given : " + ine.getMessage() );
+                        throw new DecoderException( I18n.err( I18n.ERR_04014, ine.getLocalizedMessage() ) );
                     }
                     
                     break;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
@@ -80,8 +81,8 @@
                 catch ( LdapURLEncodingException luee )
                 {
                     String badUrl = StringTools.utf8ToString( tlv.getValue().getData() );
-                    log.error( "The URL " + badUrl + " is not valid : " + luee.getMessage() );
-                    throw new DecoderException( "Invalid URL : " + luee.getMessage() );
+                    log.error( I18n.err( I18n.ERR_04015, badUrl, luee.getMessage() ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ) );
                 }
             }
             else

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -68,8 +69,8 @@
         // OID
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The name must not be null" );
-            throw new DecoderException( "The name must not be null" );
+            log.error( I18n.err( I18n.ERR_04017 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04017 ) );
         }
         else
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.LdapResultCodec;
@@ -80,8 +81,7 @@
         }
         catch ( IntegerDecoderException ide )
         {
-            log.error( "The result code " + StringTools.dumpBytes( value.getData() ) + " is invalid : "
-                + ide.getMessage() + ". The result code must be between (0 .. 121)" );
+            log.error( I18n.err( I18n.ERR_04018, StringTools.dumpBytes( value.getData() ), ide.getMessage() ) );
 
             throw new DecoderException( ide.getMessage() );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
@@ -66,8 +67,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The substring any filter is empty" );
-            throw new DecoderException( "The substring any filter is empty" );
+            log.error( I18n.err( I18n.ERR_04019 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04019 ) );
         }
 
         String any = StringTools.utf8ToString( tlv.getValue().getData() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
 import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
@@ -66,8 +67,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The substring final filter is empty" );
-            throw new DecoderException( "The substring final filter is empty" );
+            log.error( I18n.err( I18n.ERR_04020 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04020 ) );
         }
 
         String finalValue = StringTools.utf8ToString( tlv.getValue().getData() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreReferenceAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
@@ -83,8 +84,8 @@
             catch ( LdapURLEncodingException luee )
             {
                 String badUrl = StringTools.utf8ToString( tlv.getValue().getData() );
-                log.error( "The URL {} is not valid : {}", badUrl, luee.getMessage() );
-                throw new DecoderException( "Invalid URL : " + luee.getMessage() );
+                log.error( I18n.err( I18n.ERR_04021, badUrl, luee.getMessage() ) );
+                throw new DecoderException( I18n.err( I18n.ERR_04016, luee.getMessage() ) );
             }
         }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
 import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
@@ -63,8 +64,8 @@
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( "The type cannot be null in a MacthingRuleAssertion" );
-            throw new DecoderException( "The type cannot be null in a MacthingRuleAssertion" );
+            log.error( I18n.err( I18n.ERR_04022 ) );
+            throw new DecoderException( I18n.err( I18n.ERR_04022 ) );
         }
         else
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -112,7 +113,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 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;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -242,7 +243,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The version

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -192,7 +193,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 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;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -192,8 +193,8 @@
     {
         if ( buffer == null )
         {
-            log.error( "Cannot put a PDU in a null buffer !" );
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            log.error( I18n.err( I18n.ERR_04023 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -212,8 +213,8 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( "The PDU buffer size is too small !" );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_04005 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_04005)  );
         }
 
         return buffer;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -133,8 +134,8 @@
     {
         if ( buffer == null )
         {
-            log.error( "Cannot put a PDU in a null buffer !" );
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            log.error( I18n.err( I18n.ERR_04023 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -150,8 +151,8 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( "The PDU buffer size is too small !" );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_04005 ) );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         return buffer;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -248,7 +249,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The attributeDesc

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/AbstractControl.java Sun Feb 21 20:52:31 2010
@@ -28,6 +28,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -175,7 +176,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -188,7 +189,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The control type

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/ControlImpl.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -107,7 +108,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControl.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -103,7 +104,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncDoneValue/SyncDoneValueControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.BooleanDecoder;
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -149,7 +150,7 @@
                 }
                 catch ( BooleanDecoderException be )
                 {
-                    String msg = "failed to decode the refreshDeletes flag for SyncDoneValueControl";
+                    String msg = I18n.err( I18n.ERR_04024 );
                     LOG.error( msg, be );
                     throw new DecoderException( msg );
                 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControl.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationInfoEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -303,7 +304,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncInfoValue/SyncInfoValueControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.BooleanDecoder;
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationInfoEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -235,7 +236,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDone flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04025 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -288,7 +289,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDone flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04025 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -411,7 +412,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDone flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04025 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -464,7 +465,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDone flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04025 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -575,7 +576,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDeletes flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04026 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -621,7 +622,7 @@
                     }
                     catch ( BooleanDecoderException be )
                     {
-                        String msg = "failed to decode the refreshDeletes flag for SyncInfoValueControl";
+                        String msg = I18n.err( I18n.ERR_04024 );
                         LOG.error( msg, be );
                         throw new DecoderException( msg );
                     }
@@ -735,7 +736,7 @@
                     // UUID must be exactly 16 bytes long
                     if ( ( uuid == null ) || ( uuid.length != 16 ) )
                     {
-                        String msg = "Bad UUID value, its length is incorrect ( it should be 16 bytes long)";
+                        String msg = I18n.err( I18n.ERR_04027 );
                         LOG.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -782,7 +783,7 @@
                     // UUID must be exactly 16 bytes long
                     if ( ( uuid == null ) || ( uuid.length != 16 ) )
                     {
-                        String msg = "Bad UUID value, its length is incorrect ( it should be 16 bytes long)";
+                        String msg = I18n.err( I18n.ERR_04027 );
                         LOG.error( msg );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControl.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -158,7 +159,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncRequestValue/SyncRequestValueControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -141,7 +142,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the mode for SyncRequestValueControl";
+                        String msg = I18n.err( I18n.ERR_04028 );
                         LOG.error( msg, e );
                         throw new DecoderException( msg );
                     }
@@ -218,7 +219,7 @@
                     }
                     catch ( BooleanDecoderException e )
                     {
-                        String msg = "failed to decode the reloadHint flag for SyncRequestValueControl";
+                        String msg = I18n.err( I18n.ERR_04029 );
                         LOG.error( msg, e );
                         throw new DecoderException( msg );
                     }
@@ -261,7 +262,7 @@
                     }
                     catch ( BooleanDecoderException e )
                     {
-                        String msg = "failed to decode the reloadHint flag for SyncRequestValueControl";
+                        String msg = I18n.err( I18n.ERR_04029 );
                         LOG.error( msg, e );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControl.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -160,7 +161,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
         
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -134,7 +135,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the mode for SyncStateValueControl";
+                        String msg = I18n.err( I18n.ERR_04030 );
                         LOG.error( msg, e );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -145,7 +146,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -109,7 +110,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -203,7 +204,7 @@
             // The requestName, if any
             if ( requestName == null )
             {
-                throw new EncoderException( "The request name must not be null" );
+                throw new EncoderException( I18n.err( I18n.ERR_04043 ) );
             }
 
             buffer.put( ( byte ) LdapConstants.EXTENDED_REQUEST_NAME_TAG );
@@ -229,7 +230,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -250,7 +251,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/cancel/CancelGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -130,8 +131,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the cancelId, the value should be between 0 and 2^31-1, " + 
-                            "it is '" + StringTools.dumpBytes( value.getData() ) + "'";
+                        String msg = I18n.err( I18n.ERR_04031, StringTools.dumpBytes( value.getData() ) );
                         LOG.error( msg );
                         throw new DecoderException( msg );
                     }



Mime
View raw message