directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r424923 - /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Mon, 24 Jul 2006 06:26:23 GMT
Author: elecharny
Date: Sun Jul 23 23:26:22 2006
New Revision: 424923

URL: http://svn.apache.org/viewvc?rev=424923&view=rev
Log:
Replaced the direct call to isDebugEnabled() by a check on a 
static boolean IS_DEBUG, because it's faster.

Modified:
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=424923&r1=424922&r2=424923&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sun Jul 23 23:26:22 2006
@@ -84,6 +84,9 @@
 {
     private static final Logger log = LoggerFactory.getLogger( DefaultPartitionNexus.class
);
 
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = log.isDebugEnabled();
+
     /** the vendorName string proudly set to: Apache Software Foundation*/
     private static final String ASF = "Apache Software Foundation";
 
@@ -888,7 +891,7 @@
      */
     public boolean hasEntry( LdapDN dn ) throws NamingException
     {
-        if ( log.isDebugEnabled() )
+        if ( IS_DEBUG )
         {
             log.debug( "Check if DN '" + dn + "' exists." );
         }



Mime
View raw message