directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r951309 - in /directory: apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/ shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/ shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/l...
Date Fri, 04 Jun 2010 07:23:59 GMT
Author: felixk
Date: Fri Jun  4 07:23:58 2010
New Revision: 951309

URL: http://svn.apache.org/viewvc?rev=951309&view=rev
Log:
Don't resolve translation twice for logging and exception

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAndFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitAttributeDescFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitNotFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitOrFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/InitSubstringsFilterAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResponseNameAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreAnyAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreFinalAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/StoreTypeMatchingRuleAction.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=951309&r1=951308&r2=951309&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Fri Jun  4 07:23:58 2010
@@ -418,8 +418,9 @@ public class AuthenticationInterceptor e
         if ( operation.getSession().isAnonymous() && !directoryService.isAllowAnonymousAccess()

             && !operation.getDn().isEmpty() )
         {
-            LOG.error( I18n.err( I18n.ERR_5, operation.getName() ) );
-            throw new LdapNoPermissionException( I18n.err( I18n.ERR_5, operation.getName()
) );
+            String msg = I18n.err( I18n.ERR_5, operation.getName() );
+            LOG.error( msg );
+            throw new LdapNoPermissionException( msg );
         }
     }
 

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -233,8 +233,9 @@ public class Asn1Decoder implements ITLV
 
                 if ( expectedLength > 4 )
                 {
-                    LOG.error( I18n.err( I18n.ERR_00005 ) );
-                    throw new DecoderException( I18n.err( I18n.ERR_00005 ) );
+                    String msg = I18n.err( I18n.ERR_00005 );
+                    LOG.error( msg );
+                    throw new DecoderException( msg );
                 }
 
                 tlv.setLength( 0 );
@@ -244,8 +245,9 @@ public class Asn1Decoder implements ITLV
             }
             else
             {
-                LOG.error( I18n.err( I18n.ERR_00006 ) );
-                throw new DecoderException( I18n.err( I18n.ERR_00006 ) );
+                String msg = I18n.err( I18n.ERR_00006 );
+                LOG.error( msg );
+                throw new DecoderException( msg );
             }
 
             return MORE;
@@ -363,8 +365,9 @@ public class Asn1Decoder implements ITLV
         
         if ( tlv == null )
         {
-            LOG.error( I18n.err( I18n.ERR_00007 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_00007 ) );
+            String msg = I18n.err( I18n.ERR_00007 );
+            LOG.error( msg );
+            throw new DecoderException( msg );
         }
         
         int length = tlv.getLength();

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=951309&r1=951308&r2=951309&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
(original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
Fri Jun  4 07:23:58 2010
@@ -301,14 +301,16 @@ public class LdifReader implements Itera
 
         if ( !file.exists() )
         {
-            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile()
) );
+            String msg = I18n.err( I18n.ERR_12010, file.getAbsoluteFile() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
 
         if ( !file.canRead() )
         {
-            LOG.error( I18n.err( I18n.ERR_12011, file.getName() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12011, file.getName() ) );
+            String msg = I18n.err( I18n.ERR_12011, file.getName() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
 
         try
@@ -317,8 +319,9 @@ public class LdifReader implements Itera
         }
         catch ( FileNotFoundException fnfe )
         {
-            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile()
) );
+            String msg = I18n.err( I18n.ERR_12010, file.getAbsoluteFile() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
         catch ( LdapInvalidDnException lide )
         {
@@ -373,14 +376,16 @@ public class LdifReader implements Itera
     {
         if ( !file.exists() )
         {
-            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile()
) );
+            String msg = I18n.err( I18n.ERR_12010, file.getAbsoluteFile() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
 
         if ( !file.canRead() )
         {
-            LOG.error( I18n.err( I18n.ERR_12011, file.getName() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12011, file.getName() ) );
+            String msg = I18n.err( I18n.ERR_12011, file.getName() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
 
         try
@@ -389,8 +394,9 @@ public class LdifReader implements Itera
         }
         catch ( FileNotFoundException fnfe )
         {
-            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
-            throw new LdapLdifException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile()
) );
+            String msg = I18n.err( I18n.ERR_12010, file.getAbsoluteFile() );
+            LOG.error( msg );
+            throw new LdapLdifException( msg );
         }
         catch ( LdapInvalidDnException lide )
         {
@@ -433,7 +439,7 @@ public class LdifReader implements Itera
     }
 
 
-    // <fill> ::= ' ' <fill> | ���
+    // <fill> ::= ' ' <fill> | ���������
     private static void parseFill( char[] document, Position position )
     {
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java?rev=951309&r1=951308&r2=951309&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
Fri Jun  4 07:23:58 2010
@@ -98,8 +98,9 @@ public class LdapEncoder implements Prov
         }
         catch ( EncoderException e )
         {
-            log.error( I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() ) );
-            ProviderException pe = new ProviderException( provider, I18n.err( I18n.ERR_04065,
obj, e.getLocalizedMessage() ) );
+            String msg = I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() );
+            log.error( msg );
+            ProviderException pe = new ProviderException( provider, msg );
             throw pe;
         }
     }
@@ -134,8 +135,9 @@ public class LdapEncoder implements Prov
         }
         catch ( EncoderException e )
         {
-            log.error( I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() ) );
-            ProviderException pe = new ProviderException( provider, I18n.err( I18n.ERR_04065,
obj, e.getLocalizedMessage() ) );
+            String msg = I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() );
+            log.error( msg );
+            ProviderException pe = new ProviderException( provider, msg );
             throw pe;
         }
     }
@@ -169,8 +171,9 @@ public class LdapEncoder implements Prov
         }
         catch ( EncoderException e )
         {
-            log.error( I18n.err( I18n.ERR_04065,  obj, e.getLocalizedMessage() ) );
-            ProviderException pe = new ProviderException( provider, I18n.err( I18n.ERR_04065,
obj, e.getLocalizedMessage() ) );
+            String msg = I18n.err( I18n.ERR_04065,  obj, e.getLocalizedMessage() );
+            log.error( msg );
+            ProviderException pe = new ProviderException( provider, msg );
             throw pe;
         }
     }

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -2856,9 +2856,10 @@ public class LdapMessageGrammar extends 
                     // OID
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04095 ) );
+                        String msg = I18n.err( I18n.ERR_04095 );
+                        log.error( msg );
                         // This will generate a PROTOCOL_ERROR                        
-                        throw new DecoderException( I18n.err( I18n.ERR_04095 ) );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -3220,9 +3221,10 @@ public class LdapMessageGrammar extends 
                     // OID.
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04095 ) );
+                        String msg = I18n.err( I18n.ERR_04095 );
+                        log.error( msg );
                         // This will generate a PROTOCOL_ERROR                        
-                        throw new DecoderException( I18n.err( I18n.ERR_04095 ) );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -3381,10 +3383,11 @@ public class LdapMessageGrammar extends 
                 // The Length should be null
                 if ( expectedLength == 0 )
                 {
-                    log.error( I18n.err( I18n.ERR_04096 ) );
+                    String msg = I18n.err( I18n.ERR_04096 );
+                    log.error( msg );
 
                     // This will generate a PROTOCOL_ERROR
-                    throw new DecoderException( I18n.err( I18n.ERR_04096 ) );
+                    throw new DecoderException( msg );
                 }
             }
         };
@@ -3425,10 +3428,11 @@ public class LdapMessageGrammar extends 
                     // We have to handle the special case of a 0 length OID
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04097 ) );
+                        String msg = I18n.err( I18n.ERR_04097 );
+                        log.error( msg );
 
                         // This will generate a PROTOCOL_ERROR
-                        throw new DecoderException( I18n.err( I18n.ERR_04097 ) );
+                        throw new DecoderException( msg );
                     }
 
                     byte[] value = tlv.getValue().getData();
@@ -3689,8 +3693,9 @@ public class LdapMessageGrammar extends 
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( I18n.err( I18n.ERR_04101, value.toString() ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04101, value.toString()
) );
+                        String msg = I18n.err( I18n.ERR_04101, value.toString() );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
 
                     searchRequest.setScope( SearchScope.getSearchScope( scope ) );
@@ -3751,8 +3756,9 @@ public class LdapMessageGrammar extends 
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( I18n.err( I18n.ERR_04102, value.toString() ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04102, value.toString()
) );
+                        String msg = I18n.err( I18n.ERR_04102, value.toString() );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
 
                     searchRequest.setDerefAliases( derefAliases );
@@ -3813,8 +3819,9 @@ public class LdapMessageGrammar extends 
                     }
                     catch ( LongDecoderException lde )
                     {
-                        log.error( I18n.err( I18n.ERR_04103, value.toString() ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04103, value.toString()
) );
+                        String msg = I18n.err( I18n.ERR_04103, value.toString() );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
 
                     searchRequest.setSizeLimit( sizeLimit );
@@ -3859,8 +3866,9 @@ public class LdapMessageGrammar extends 
                     }
                     catch ( IntegerDecoderException ide )
                     {
-                        log.error( I18n.err( I18n.ERR_04104, value.toString() ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04104, value.toString()
) );
+                        String msg = I18n.err( I18n.ERR_04104, value.toString() );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
 
                     searchRequest.setTimeLimit( timeLimit );
@@ -5039,8 +5047,9 @@ public class LdapMessageGrammar extends 
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04106 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04106 ) );
+                        String msg = I18n.err( I18n.ERR_04106 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -5112,8 +5121,9 @@ public class LdapMessageGrammar extends 
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04108 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04108 ) );
+                        String msg = I18n.err( I18n.ERR_04108 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
 
                     substringFilter.setInitialSubstrings( StringTools.utf8ToString( tlv.getValue().getData()
) );
@@ -6033,7 +6043,8 @@ public class LdapMessageGrammar extends 
 
                     if ( tlv.getLength() == 0 )
                     {
-                        log.error( I18n.err( I18n.ERR_04109 ) );
+                        String msg = I18n.err( I18n.ERR_04109 );
+                        log.error( msg );
 
                         // It will generate a PROTOCOL_ERROR
                         throw new DecoderException( I18n.err( I18n.ERR_04109 ) );

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -63,8 +63,9 @@ public class InitAndFilterAction extends
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04006 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04006 ) );
+            String msg = I18n.err( I18n.ERR_04006 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -67,8 +67,9 @@ public class InitAttributeDescFilterActi
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04007 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04007 ) );
+            String msg = I18n.err( I18n.ERR_04007 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
         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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -63,8 +63,9 @@ public class InitNotFilterAction extends
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04009 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04009 ) );
+            String msg = I18n.err( I18n.ERR_04009 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -63,8 +63,9 @@ public class InitOrFilterAction extends 
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04010 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04010 ) );
+            String msg = I18n.err( I18n.ERR_04010 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest();

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -66,8 +66,9 @@ public class InitSubstringsFilterAction 
 
         if ( expectedLength == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04012 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04012 ) );
+            String msg = I18n.err( I18n.ERR_04012 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         // We can allocate the SearchRequest

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -69,8 +69,9 @@ public class ResponseNameAction extends 
         // OID
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04017 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04017 ) );
+            String msg = I18n.err( I18n.ERR_04017 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
         else
         {

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -67,8 +67,9 @@ public class StoreAnyAction extends Gram
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04019 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04019 ) );
+            String msg = I18n.err( I18n.ERR_04019 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -67,8 +67,9 @@ public class StoreFinalAction extends Gr
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04020 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04020 ) );
+            String msg = I18n.err( I18n.ERR_04020 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
 
         String finalValue = StringTools.utf8ToString( tlv.getValue().getData() );

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -64,8 +64,9 @@ public class StoreTypeMatchingRuleAction
 
         if ( tlv.getLength() == 0 )
         {
-            log.error( I18n.err( I18n.ERR_04022 ) );
-            throw new DecoderException( I18n.err( I18n.ERR_04022 ) );
+            String msg = I18n.err( I18n.ERR_04022 );
+            log.error( msg );
+            throw new DecoderException( msg );
         }
         else
         {

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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -197,8 +197,9 @@ public class SaslCredentials extends Lda
     {
         if ( buffer == null )
         {
-            log.error( I18n.err( I18n.ERR_04023 ) );
-            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
+            String msg = I18n.err( I18n.ERR_04023 );
+            log.error( msg );
+            throw new EncoderException( msg );
         }
 
         try
@@ -217,8 +218,9 @@ public class SaslCredentials extends Lda
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( I18n.err( I18n.ERR_04005 ) );
-            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
+            String msg = I18n.err( I18n.ERR_04005 );
+            log.error( msg );
+            throw new EncoderException( msg );
         }
 
         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=951309&r1=951308&r2=951309&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
Fri Jun  4 07:23:58 2010
@@ -134,8 +134,9 @@ public class SimpleAuthentication extend
     {
         if ( buffer == null )
         {
-            log.error( I18n.err( I18n.ERR_04023 ) );
-            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
+            String msg = I18n.err( I18n.ERR_04023 );
+            log.error( msg );
+            throw new EncoderException( msg );
         }
 
         try
@@ -151,8 +152,9 @@ public class SimpleAuthentication extend
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( I18n.err( I18n.ERR_04005 ) );
-            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
+            String msg = I18n.err( I18n.ERR_04005 );
+            log.error( msg );
+            throw new EncoderException( msg );
         }
 
         return buffer;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java?rev=951309&r1=951308&r2=951309&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
Fri Jun  4 07:23:58 2010
@@ -102,8 +102,9 @@ public class StoredProcedureGrammar exte
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void language !
-                        log.error( I18n.err( I18n.ERR_04038 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04038 ) );
+                        String msg = I18n.err( I18n.ERR_04038 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -145,8 +146,9 @@ public class StoredProcedureGrammar exte
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void procedure !
-                        log.error( I18n.err( I18n.ERR_04039 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04039 ) );
+                        String msg = I18n.err( I18n.ERR_04039 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -211,8 +213,9 @@ public class StoredProcedureGrammar exte
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void parameter type !
-                        log.error( I18n.err( I18n.ERR_04040 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04040 ) );
+                        String msg = I18n.err( I18n.ERR_04040 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -256,8 +259,9 @@ public class StoredProcedureGrammar exte
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void parameter value !
-                        log.error( I18n.err( I18n.ERR_04041 ) );
-                        throw new DecoderException( I18n.err( I18n.ERR_04041 ) );
+                        String msg = I18n.err( I18n.ERR_04041 );
+                        log.error( msg );
+                        throw new DecoderException( msg );
                     }
                     else
                     {
@@ -278,8 +282,9 @@ public class StoredProcedureGrammar exte
                         }
                         else
                         {
-                            log.error( I18n.err( I18n.ERR_04042 ) );
-                            throw new DecoderException( I18n.err( I18n.ERR_04042 ) );
+                            String msg = I18n.err( I18n.ERR_04042 );
+                            log.error( msg );
+                            throw new DecoderException( msg );
                         }
                     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java?rev=951309&r1=951308&r2=951309&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/DN.java
Fri Jun  4 07:23:58 2010
@@ -1419,8 +1419,9 @@ public class DN implements Cloneable, Se
         else
         {
             // The type is empty : this is not possible...
-            LOG.error( I18n.err( I18n.ERR_04209 ) );
-            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, I18n.err(
I18n.ERR_04209 ) );
+            String msg = I18n.err( I18n.ERR_04209 );
+            LOG.error( msg );
+            throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, msg );
         }
     }
 



Mime
View raw message