You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/08/29 07:25:31 UTC

svn commit: r264070 - /directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java

Author: elecharny
Date: Sun Aug 28 22:25:27 2005
New Revision: 264070

URL: http://svn.apache.org/viewcvs?rev=264070&view=rev
Log:
- Supressed the DEBUG member and replaced all the if (DEBUG) by if (log.isDebugEnabled())
- changed the initialisation of the attributes, a test has been added to deal witth a null list 

Modified:
    directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java

Modified: directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java?rev=264070&r1=264069&r2=264070&view=diff
==============================================================================
--- directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java (original)
+++ directory/shared/ldap/branches/new-codec-integration/apache2-provider/src/java/main/org/apache/asn1new/ldap/codec/grammar/SearchRequestGrammar.java Sun Aug 28 22:25:27 2005
@@ -51,9 +51,6 @@
     /** The logger */
     private static final Logger log = LoggerFactory.getLogger( SearchRequestGrammar.class );
 
-    /** Logging speed up  */
-    private static final boolean DEBUG = log.isDebugEnabled();
-
     /** The instance of grammar. SearchRequestGrammar is a singleton */
     private static IGrammar instance = new SearchRequestGrammar();
 
@@ -551,7 +548,13 @@
                         SearchRequest     searchRequest =
                             ldapMessageContainer.getLdapMessage().getSearchRequest();
 
-                        searchRequest.initAttributes();
+                        TLV                  tlv = ldapMessageContainer.getCurrentTLV();
+
+                        // The attribute list may be null.
+                        if ( tlv.getLength().getLength() != 0 )
+                        {
+                        	searchRequest.initAttributes();
+                        }
 
                         return;
                     }