directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r427793 [1/6] - in /directory/branches/shared/0.9.5: asn1/src/main/java/org/apache/directory/shared/asn1/ber/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ ldap/ ldap/src/main/antlr/ ldap/src/main/java/org/apache/director...
Date Tue, 01 Aug 2006 23:35:23 GMT
Author: elecharny
Date: Tue Aug  1 16:35:20 2006
New Revision: 427793

URL: http://svn.apache.org/viewvc?rev=427793&view=rev
Log:
Merging changes form optimization branch of shared back into this 1.0 branches. Here's the merge command used: svn merge -r 414084:427187 https://svn.apache.org/repos/asf/directory/branches/shared/optimization .

Added:
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
      - copied unchanged from r427187, directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
      - copied unchanged from r427187, directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDnParser.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java   (props changed)
      - copied unchanged from r427187, directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java   (props changed)
      - copied unchanged from r427187, directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/name/RdnParser.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
      - copied unchanged from r427187, directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/Position.java
Removed:
    directory/branches/shared/0.9.5/ldap/src/main/antlr/DnCommonTokenTypes.txt
    directory/branches/shared/0.9.5/ldap/src/main/antlr/dnparser.g
    directory/branches/shared/0.9.5/ldap/src/main/antlr/typelexer.g
    directory/branches/shared/0.9.5/ldap/src/main/antlr/valuelexer.g
    directory/branches/shared/0.9.5/ldap/src/main/antlr/valueparser.g
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrNameParser.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrTypeLexer.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/name/ReusableAntlrValueLexer.java
Modified:
    directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
    directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
    directory/branches/shared/0.9.5/ldap/pom.xml
    directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g
    directory/branches/shared/0.9.5/ldap/src/main/antlr/subtree-specification.g
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ControlValueAction.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapControlGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequest.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/FilterGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/MatchingRuleAssertionGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequest.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntry.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilterGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControl.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlGrammar.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributeImpl.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/LockableAttributesImpl.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnResponseImpl.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NormalizerMappingResolver.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SyntaxChecker.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParser.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/ComponentsMonitor.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/DNUtils.java
    directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/aci/ACIItemParserTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDnParserTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationParserTest.java
    directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java

Modified: directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java (original)
+++ directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java Tue Aug  1 16:35:20 2006
@@ -49,7 +49,10 @@
 
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( Asn1Decoder.class );
-
+    
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** This flag is used to indicate that there are more bytes in the stream */
     private static final boolean MORE = true;
 
@@ -249,7 +252,10 @@
             current = current.getParent();
         }
 
-        log.debug( "TLV Tree : {}", sb.toString() );
+        if ( IS_DEBUG ) 
+        {
+            log.debug( "TLV Tree : {}", sb.toString() );
+        }
     }
 
 
@@ -301,7 +307,7 @@
     private void treatTagEndState( IAsn1Container container ) throws DecoderException, NamingException
     {
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             Tag tag = container.getCurrentTLV().getTag();
             log.debug( "Tag {} has been decoded", tag.toString() );
@@ -417,7 +423,7 @@
 
                 byte octet = stream.get();
 
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "  current byte : {}", Asn1StringUtils.dumpByte( octet ) );
                 }
@@ -490,7 +496,7 @@
         // exceeded by the current TLV.
         TLV parentTLV = container.getParentTLV();
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Parent length : {}", getParentLength( parentTLV ) );
         }
@@ -502,7 +508,7 @@
             tlv.setExpectedLength( length.getLength() );
             container.setParentTLV( tlv );
 
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Root TLV[{}]", new Integer( tlv.getLength().getLength() ) );
             }
@@ -608,7 +614,7 @@
 
         }
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Length {} has been decoded", length.toString() );
         }
@@ -742,7 +748,7 @@
      */
     private boolean treatTLVDoneState( ByteBuffer stream, IAsn1Container container ) throws DecoderException, NamingException
     {
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             dumpTLVTree( container );
         }
@@ -862,14 +868,17 @@
 
         boolean hasRemaining = stream.hasRemaining();
 
-        log.debug( ">>>==========================================" );
-        log.debug( "--> Decoding a PDU" );
-        log.debug( ">>>------------------------------------------" );
+        if ( IS_DEBUG )
+        {
+            log.debug( ">>>==========================================" );
+            log.debug( "--> Decoding a PDU" );
+            log.debug( ">>>------------------------------------------" );
+        }
 
         while ( hasRemaining )
         {
 
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "--- State = {} ---", stateToString( container.getState() ) );
 
@@ -956,7 +965,7 @@
             }
         }
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "<<<------------------------------------------" );
 

Modified: directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java (original)
+++ directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java Tue Aug  1 16:35:20 2006
@@ -44,6 +44,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( AbstractGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
@@ -114,7 +117,7 @@
 
         int tlvLength = tlv.getSize();
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Expected Length = " + ( ( Asn1Object ) object ).getExpectedLength() + ", current length = "
                 + ( ( Asn1Object ) object ).getCurrentLength() + ", added length = " + expectedLength
@@ -203,7 +206,7 @@
 
                     if ( container.isGrammarPopAllowed() )
                     {
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Pop grammar {}, state = {}", container.getStates().getGrammarName(
                                 currentGrammar ), currentGrammar.getStatesEnum().getState(
@@ -211,6 +214,7 @@
                         }
 
                         currentState = container.restoreGrammar();
+                        container.setTransition( currentState );
                         continue;
                     }
                     else
@@ -225,7 +229,7 @@
                 }
             }
 
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( transition.toString( container.getCurrentGrammarType(), currentGrammar.getStatesEnum() ) );
             }
@@ -240,7 +244,7 @@
                     transition.getAction().action( container );
                 }
 
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "Switching from grammar {} to grammar {}", container.getStates().getGrammarName(
                         currentGrammar ), container.getStates().getGrammarName( ( nextState >> 8 ) - 1 ) );

Modified: directory/branches/shared/0.9.5/ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/pom.xml?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/pom.xml (original)
+++ directory/branches/shared/0.9.5/ldap/pom.xml Tue Aug  1 16:35:20 2006
@@ -104,12 +104,7 @@
         <executions>
           <execution>
             <phase>generate-sources</phase>
-            <configuration>
-              <tasks>
-                <copy file="src/main/antlr/DnCommonTokenTypes.txt" 
-                      todir="target/generated-sources/antlr/org/apache/directory/shared/ldap/name/"/>
-              </tasks>
-            </configuration>
+            <configuration/>
             <goals>
               <goal>run</goal>
             </goals>
@@ -121,7 +116,7 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-antlr-plugin</artifactId>
         <configuration>
-          <grammars>valuelexer.g valueparser.g typelexer.g dnparser.g filter-value-lexer.g filter-lexer.g filter-lexer.g filter-value-parser.g filter-parser.g subtree-specification.g ACIItem.g</grammars>
+          <grammars>filter-value-lexer.g filter-lexer.g filter-lexer.g filter-value-parser.g filter-parser.g subtree-specification.g ACIItem.g</grammars>
         </configuration>
         <executions>
            <execution>

Modified: directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/antlr/ACIItem.g Tue Aug  1 16:35:20 2006
@@ -120,6 +120,7 @@
     private int m_precedence;
     private Set m_grantsAndDenials;
     private Set m_userPermissions;
+    private Map oidsMap;
     
     private Set chopBeforeExclusions;
     private Set chopAfterExclusions;
@@ -138,8 +139,9 @@
      *
      * @return the DnParser to be used for parsing Names
      */
-    public void init()
+    public void init( Map oidsMap )
     {
+    	this.oidsMap = oidsMap;
     }
 
     /**
@@ -488,7 +490,7 @@
         // A Dn can be considered as a set of attributeTypeAndValues
         // So, parse the set as a Dn and extract each attributeTypeAndValue
         LdapDN attributeTypeAndValueSetAsDn = new LdapDN( token.getText() );
-        attributeTypeAndValueSetAsDn.normalize();
+        attributeTypeAndValueSetAsDn.normalize( oidsMap );
         Enumeration attributeTypeAndValueSet = attributeTypeAndValueSetAsDn.getAll();
         while ( attributeTypeAndValueSet.hasMoreElements() )
         {
@@ -1153,7 +1155,7 @@
     token:SAFEUTF8STRING
     {
         name = new LdapDN( token.getText() );
-        name.normalize();
+        name.normalize( oidsMap );
         log.debug( "recognized a DistinguishedName: " + token.getText() );
     }
     ;

Modified: directory/branches/shared/0.9.5/ldap/src/main/antlr/subtree-specification.g
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/antlr/subtree-specification.g?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/antlr/subtree-specification.g (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/antlr/subtree-specification.g Tue Aug  1 16:35:20 2006
@@ -21,6 +21,7 @@
 package org.apache.directory.shared.ldap.subtree;
 
 import java.util.Set;
+import java.util.Map;
 import java.util.HashSet;
 import java.util.ArrayList;
 
@@ -80,25 +81,28 @@
 
     private SubtreeSpecificationModifier ssModifier = null;
     
+    private Map oidsMap;
+    
     private ComponentsMonitor subtreeSpecificationComponentsMonitor = null;
 
     /**
      * Does nothing.
      */
-    public void init()
+    public void init( Map oidsMap )
     {
+    	this.oidsMap = oidsMap;
     }
     
     
     public void setNormalizerMappingResolver( NormalizerMappingResolver resolver )
     {
-    	this.resolver = resolver;
+    	this.resolver = resolver;
     }
     
     
     public boolean isNormalizing()
     {
-    	return this.resolver != null;
+    	return this.resolver != null;
     }
     
 
@@ -306,7 +310,7 @@
         name = new LdapDN( token.getText() );
         if ( isNormalizing() )
         {
-        	name.normalize();
+        	name.normalize( oidsMap );
         }
         log.debug( "recognized a DistinguishedName: " + token.getText() );
     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java Tue Aug  1 16:35:20 2006
@@ -20,6 +20,7 @@
 
 import java.io.StringReader;
 import java.text.ParseException;
+import java.util.Map;
 
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 
@@ -49,12 +50,12 @@
     /**
      * Creates a ACIItem parser.
      */
-    public ACIItemParser()
+    public ACIItemParser( Map oidsMap )
     {
         this.lexer = new ReusableAntlrACIItemLexer( new StringReader( "" ) );
         this.parser = new ReusableAntlrACIItemParser( lexer );
 
-        this.parser.init(); // this method MUST be called while we cannot do
+        this.parser.init( oidsMap ); // this method MUST be called while we cannot do
         // constructor overloading for antlr generated parser
         this.isNormalizing = false;
     }
@@ -63,13 +64,13 @@
     /**
      * Creates a normalizing ACIItem parser.
      */
-    public ACIItemParser(NameComponentNormalizer normalizer)
+    public ACIItemParser(NameComponentNormalizer normalizer, Map oidsMap )
     {
         this.lexer = new ReusableAntlrACIItemLexer( new StringReader( "" ) );
         this.parser = new ReusableAntlrACIItemParser( lexer );
 
         this.parser.setNormalizer( normalizer );
-        this.parser.init(); // this method MUST be called while we cannot do
+        this.parser.init( oidsMap ); // this method MUST be called while we cannot do
         // constructor overloading for antlr generated parser
         this.isNormalizing = true;
     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ControlValueAction.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ControlValueAction.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ControlValueAction.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/ControlValueAction.java Tue Aug  1 16:35:20 2006
@@ -47,6 +47,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( ControlValueAction.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     private static Map controlDecoders = new HashMap();
 
 
@@ -104,7 +107,7 @@
         // We can have an END transition
         ldapMessageContainer.grammarEndAllowed( true );
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             if ( control.getControlValue() instanceof byte[] )
             {

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapControlGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapControlGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapControlGrammar.java Tue Aug  1 16:35:20 2006
@@ -51,6 +51,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( LdapControlGrammar.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** The instance of grammar. LdapControlGrammar is a singleton */
     private static IGrammar instance = new LdapControlGrammar();
 
@@ -208,7 +211,7 @@
                     // We can have an END transition
                     ldapMessageContainer.grammarEndAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Control OID : " + control.getControlType() );
                     }
@@ -267,7 +270,7 @@
                     // We can have an END transition
                     ldapMessageContainer.grammarEndAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Control criticality : " + control.getCriticality() );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Tue Aug  1 16:35:20 2006
@@ -48,6 +48,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( LdapMessageGrammar.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** The instance of grammar. LdapMessageGrammar is a singleton */
     private static IGrammar instance = new LdapMessageGrammar();
 
@@ -147,7 +150,7 @@
 
                         ldapMessage.setMessageId( messageId );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Ldap Message Id has been decoded : " + messageId );
                         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResultGrammar.java Tue Aug  1 16:35:20 2006
@@ -59,6 +59,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( LdapResultGrammar.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** The instance of grammar. LdapResultGrammar is a singleton */
     private static IGrammar instance = new LdapResultGrammar();
 
@@ -220,7 +223,7 @@
                             ldapResult.setResultCode( LdapResultEnum.OTHER );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The result code is set to " + LdapResultEnum.errorCode( resultCode ) );
                     }
@@ -288,7 +291,7 @@
                         }
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The matchedDN is " + ldapResult.getMatchedDN() );
                     }
@@ -349,7 +352,7 @@
                     // We can pop this grammar
                     container.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The error message is : " + ldapResult.getErrorMessage() );
                     }
@@ -455,7 +458,7 @@
                     // We can have a Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         Iterator urls = ldapResult.getReferrals().iterator();
 

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixDecoder.java Tue Aug  1 16:35:20 2006
@@ -1,3 +1,19 @@
+/*
+ *   Copyright 2006 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
 package org.apache.directory.shared.ldap.codec;
 
 
@@ -26,6 +42,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( TwixDecoder.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The associated Provider */
     private final Provider provider;
 
@@ -86,7 +105,7 @@
             {
                 ldapDecoder.decode( buf, ldapMessageContainer );
     
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "Decoding the PDU : " );
     
@@ -107,7 +126,7 @@
                 
                 if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage() );
                         buf.mark();
@@ -118,7 +137,7 @@
                 }
                 else
                 {
-                	if ( log.isDebugEnabled() )
+                	if ( IS_DEBUG )
                 	{
                 		
                 	}
@@ -189,7 +208,7 @@
 
             if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
             {
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage() );
                 }
@@ -228,7 +247,7 @@
 
             if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
             {
-                if ( log.isDebugEnabled() )
+                if ( IS_DEBUG )
                 {
                     log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage() );
                 }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixEncoder.java Tue Aug  1 16:35:20 2006
@@ -46,6 +46,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( TwixEncoder.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** The associated Provider */
     private final Provider provider;
 
@@ -82,7 +85,7 @@
     {
         try
         {
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Encoding this LdapMessage : " + obj );
             }
@@ -113,14 +116,14 @@
     {
         try
         {
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Encoding this LdapMessage : " + obj );
             }
 
             ByteBuffer pdu = ( ( LdapMessage ) obj ).encode( null );
 
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu.array() ) );
             }
@@ -152,14 +155,14 @@
     {
         try
         {
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Encoding this LdapMessage : " + obj );
             }
 
             byte[] pdu = ( ( LdapMessage ) obj ).encode( null ).array();
 
-            if ( log.isDebugEnabled() )
+            if ( IS_DEBUG )
             {
                 log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu ) );
             }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java Tue Aug  1 16:35:20 2006
@@ -121,6 +121,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( TwixTransformer.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** the provider this transformer is part of */
     private final Provider provider;
 
@@ -658,7 +661,7 @@
         LdapMessage twixMessage = ( LdapMessage ) obj;
         int messageId = twixMessage.getMessageId();
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Transforming LdapMessage <" + messageId + ", " + twixMessage.getMessageTypeName()
                 + "> from Twix to Snickers." );
@@ -1134,7 +1137,7 @@
      */
     public Object transform( Message msg )
     {
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Transforming message type " + msg.getType() );
         }
@@ -1190,7 +1193,7 @@
             transformControls( twixMessage, msg );
         }
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Transformed message : " + twixMessage );
         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequest.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequest.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequest.java Tue Aug  1 16:35:20 2006
@@ -40,6 +40,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( AbandonRequest.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
@@ -105,7 +108,7 @@
     {
         int length = 1 + 1 + Value.getNbBytes( abandonedMessageId );
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Message length : {}", new Integer( length ) );
         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/abandon/AbandonRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -52,6 +52,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( AbandonRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. AbandonRequestGrammar is a singleton */
     private static IGrammar instance = new AbandonRequestGrammar();
 
@@ -121,7 +124,7 @@
                         abandonRequest.setAbandonedMessageId( abandonnedMessageId );
                         ldapMessage.setProtocolOP( abandonRequest );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "AbandonMessage Id has been decoded : {}", new Integer( abandonnedMessageId ) );
                         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequest.java Tue Aug  1 16:35:20 2006
@@ -60,6 +60,9 @@
     /** The logger */
     private transient static final Logger log = LoggerFactory.getLogger( AddRequest.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
@@ -273,7 +276,7 @@
         // Return the result.
         int result = 1 + Length.getNbBytes( addRequestLength ) + addRequestLength;
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "AddRequest PDU length = {}", new Integer( result ) );
         }
@@ -375,7 +378,7 @@
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "AddRequest encoding : {}", StringTools.dumpBytes( buffer.array() ) );
             log.debug( "AddRequest initial value : {}", toString() );

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/add/AddRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -34,9 +34,7 @@
 import org.apache.directory.shared.ldap.codec.LdapStatesEnum;
 import org.apache.directory.shared.ldap.codec.util.LdapString;
 import org.apache.directory.shared.ldap.codec.util.LdapStringEncodingException;
-import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeIdentifierException;
-import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -58,6 +56,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( AddRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. AddRequestGrammar is a singleton */
     private static IGrammar instance = new AddRequestGrammar();
 
@@ -261,7 +262,7 @@
                         }
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Adding type {}", type );
                     }
@@ -328,7 +329,7 @@
                         {
                             value = tlv.getValue().getData();
 
-                            if ( log.isDebugEnabled() )
+                            if ( IS_DEBUG )
                             {
                                 log.debug( "Adding value {}", StringTools.dumpBytes( ( byte[] ) value ) );
                             }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -58,6 +58,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( BindRequestGrammar.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     /** The instance of grammar. BindRequestGrammar is a singleton */
     private static IGrammar instance = new BindRequestGrammar();
 
@@ -163,7 +166,7 @@
                             throw new DecoderException( "Ldap Version " + version + " is not supported" );
                         }
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Ldap version ", new Integer( version ) );
                         }
@@ -228,7 +231,7 @@
                         bindRequestMessage.setName( name );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( " The Bind name is {}", bindRequestMessage.getName() );
                     }
@@ -291,7 +294,7 @@
                     // We can have an pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The simple authentication is : {}", authentication.getSimple() );
                     }
@@ -356,7 +359,10 @@
 
                     bindRequestMessage.setAuthentication( authentication );
 
-                    log.debug( "The SaslCredential has been created" );
+                    if ( IS_DEBUG ) 
+                    {
+                        log.debug( "The SaslCredential has been created" );
+                    }
 
                     return;
                 }
@@ -422,7 +428,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The mechanism is : {}", authentication.getMechanism() );
                     }
@@ -499,7 +505,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The credentials are : {}", credentials.getCredentials() );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/BindResponseGrammar.java Tue Aug  1 16:35:20 2006
@@ -49,6 +49,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( BindResponseGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. BindResponseGrammar is a singleton */
     private static IGrammar instance = new BindResponseGrammar();
 
@@ -181,7 +184,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "The SASL credentials value is : {}", bindResponseMessage.getServerSaslCreds()
                             .toString() );

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SaslCredentials.java Tue Aug  1 16:35:20 2006
@@ -39,6 +39,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( SimpleAuthentication.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
@@ -127,7 +130,7 @@
         int saslLength = 1 + Length.getNbBytes( mechanismLength + credentialsLength ) + mechanismLength
             + credentialsLength;
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "SASL Authentication length : {}", new Integer( saslLength ) );
         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/bind/SimpleAuthentication.java Tue Aug  1 16:35:20 2006
@@ -37,6 +37,9 @@
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( SimpleAuthentication.class );
 
+    /** A speedup for logger */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+    
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
@@ -81,7 +84,7 @@
 
         length += Length.getNbBytes( simple.length ) + simple.length;
 
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Simple Authentication length : {}", new Integer( length ) );
         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -55,6 +55,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( CompareRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. CompareRequest is a singleton */
     private static IGrammar instance = new CompareRequestGrammar();
 
@@ -149,7 +152,7 @@
                         compareRequest.setEntry( entry );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Comparing DN {}", entry );
                     }
@@ -223,7 +226,7 @@
                         }
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Comparing attribute description {}", compareRequest.getAttributeDesc() );
                     }
@@ -269,7 +272,7 @@
                         {
                             compareRequest.setAssertionValue( tlv.getValue().getData() );
 
-                            if ( log.isDebugEnabled() )
+                            if ( IS_DEBUG )
                             {
                                 log.debug( "Comparing attribute value {}", StringTools
                                     .dumpBytes( ( byte[] ) compareRequest.getAssertionValue() ) );

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/del/DelRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -52,6 +52,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( DelRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. DelRequestGrammar is a singleton */
     private static IGrammar instance = new DelRequestGrammar();
 
@@ -129,7 +132,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Deleting DN {}", entry );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -50,6 +50,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( ExtendedRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. ExtendedRequest is a singleton */
     private static IGrammar instance = new ExtendedRequestGrammar();
 
@@ -139,7 +142,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "OID read : {}", extendedRequest.getRequestName() );
                     }
@@ -190,7 +193,7 @@
                     // We can have an Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Extended value : {}", extendedRequest.getRequestValue() );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseGrammar.java Tue Aug  1 16:35:20 2006
@@ -51,6 +51,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( ExtendedResponseGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. ExtendedResponseGrammar is a singleton */
     private static IGrammar instance = new ExtendedResponseGrammar();
 
@@ -158,7 +161,7 @@
                     // We can have a Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "OID read : {}", extendedResponse.getResponseName() );
                     }
@@ -210,7 +213,7 @@
                     // We can have a Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Extended value : {}", extendedResponse.getResponse() );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectGrammar.java Tue Aug  1 16:35:20 2006
@@ -60,6 +60,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( GracefulDisconnectGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. GracefulDisconnectnGrammar is a singleton */
     private static IGrammar instance = new GracefulDisconnectGrammar();
 
@@ -144,7 +147,7 @@
                     {
                         int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Time Offline = " + timeOffline );
                         }
@@ -188,7 +191,7 @@
                     {
                         int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Delay = " + delay );
                         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownGrammar.java Tue Aug  1 16:35:20 2006
@@ -51,6 +51,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( GracefulShutdownGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. GracefulShutdownGrammar is a singleton */
     private static IGrammar instance = new GracefulShutdownGrammar();
 
@@ -123,7 +126,7 @@
                     {
                         int timeOffline = IntegerDecoder.parse( value, 0, 720 );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Time Offline = " + timeOffline );
                         }
@@ -167,7 +170,7 @@
                     {
                         int delay = IntegerDecoder.parse( value, 0, 86400 );
 
-                        if ( log.isDebugEnabled() )
+                        if ( IS_DEBUG )
                         {
                             log.debug( "Delay = " + delay );
                         }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -56,6 +56,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( ModifyRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. ModifyRequestGrammar is a singleton */
     private static IGrammar instance = new ModifyRequestGrammar();
 
@@ -153,7 +156,7 @@
                         modifyRequest.setObject( object );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Modification of DN {}", modifyRequest.getObject() );
                     }
@@ -268,7 +271,7 @@
                     // Store the current operation.
                     modifyRequest.setCurrentOperation( operation );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         switch ( operation )
                         {
@@ -350,7 +353,7 @@
                         }
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Modifying type : {}", type );
                     }

Modified: directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java?rev=427793&r1=427792&r2=427793&view=diff
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java (original)
+++ directory/branches/shared/0.9.5/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestGrammar.java Tue Aug  1 16:35:20 2006
@@ -57,6 +57,9 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( ModifyDNRequestGrammar.class );
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** The instance of grammar. ModifyDNRequestGrammar is a singleton */
     private static IGrammar instance = new ModifyDNRequestGrammar();
 
@@ -153,7 +156,7 @@
                         modifyDNRequest.setEntry( entry );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Modifying DN {}", entry );
                     }
@@ -219,7 +222,7 @@
                         modifyDNRequest.setNewRDN( newRdn );
                     }
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "Modifying with new RDN {}", newRdn );
                     }
@@ -281,7 +284,7 @@
                     // We can have a Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         if ( modifyDNRequest.isDeleteOldRDN() )
                         {
@@ -367,7 +370,7 @@
                     // We can have a Pop transition
                     ldapMessageContainer.grammarPopAllowed( true );
 
-                    if ( log.isDebugEnabled() )
+                    if ( IS_DEBUG )
                     {
                         log.debug( "New superior DN {}", newSuperior );
                     }



Mime
View raw message