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 2006/07/24 08:26:23 UTC
svn commit: r424923 -
/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
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." );
}