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:27:46 UTC
svn commit: r424925 -
/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
Author: elecharny
Date: Sun Jul 23 23:27:46 2006
New Revision: 424925
URL: http://svn.apache.org/viewvc?rev=424925&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/authn/AuthenticationService.java
Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java?rev=424925&r1=424924&r2=424925&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java (original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationService.java Sun Jul 23 23:27:46 2006
@@ -60,6 +60,9 @@
public class AuthenticationService extends BaseInterceptor
{
private static final Logger log = LoggerFactory.getLogger( AuthenticationService.class );
+
+ /** Speedup for logs */
+ private static final boolean IS_DEBUG = log.isDebugEnabled();
/** authenticators **/
public Map authenticators = new HashMap();
@@ -183,7 +186,7 @@
public void add( NextInterceptor next, LdapDN normName, Attributes entry ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Adding the entry " + AttributeUtils.toString( entry ) + " for DN = '"
+ normName.getUpName() + "'" );
@@ -196,7 +199,7 @@
public void delete( NextInterceptor next, LdapDN name ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Deleting name = '" + name.toString() + "'" );
}
@@ -209,7 +212,7 @@
public LdapDN getMatchedName ( NextInterceptor next, LdapDN dn ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Matching name = '" + dn.toString() + "'" );
}
@@ -221,7 +224,7 @@
public Attributes getRootDSE( NextInterceptor next ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Getting root DSE" );
}
@@ -233,7 +236,7 @@
public LdapDN getSuffix ( NextInterceptor next, LdapDN dn ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Getting suffix for name = '" + dn.toString() + "'" );
}
@@ -245,7 +248,7 @@
public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Testing if entry name = '" + name.toString() + "' exists" );
}
@@ -257,7 +260,7 @@
public boolean isSuffix( NextInterceptor next, LdapDN name ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Testing suffix for name = '" + name.toString() + "'" );
}
@@ -269,7 +272,7 @@
public NamingEnumeration list( NextInterceptor next, LdapDN base ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Listing base = '" + base.toString() + "'" );
}
@@ -281,7 +284,7 @@
public Iterator listSuffixes ( NextInterceptor next ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Listing suffixes" );
}
@@ -293,7 +296,7 @@
public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Lookup name = '" + dn.toString() + "', attributes = " + attrIds );
}
@@ -305,7 +308,7 @@
public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Lookup name = '" + name.toString() + "'" );
}
@@ -335,7 +338,7 @@
public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Modifying name = '" + name.toString() + "', modifs = " + AttributeUtils.toString( mods ) );
}
@@ -348,7 +351,7 @@
public void modify( NextInterceptor next, LdapDN name, ModificationItem[] mods ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Modifying name = '" + name.toString() + "'" );
}
@@ -361,7 +364,7 @@
public void modifyRn( NextInterceptor next, LdapDN name, String newRn, boolean deleteOldRn ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Modifying name = '" + name.toString() + "', new RDN = '" + newRn + "', oldRDN = '"
+ deleteOldRn + "'" );
@@ -376,7 +379,7 @@
public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName, String newRn, boolean deleteOldRn )
throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Moving name = '" + oriChildName.toString() + "' to name = '" + newParentName + "', new RDN = '"
+ newRn + "', oldRDN = '" + deleteOldRn + "'" );
@@ -390,7 +393,7 @@
public void move( NextInterceptor next, LdapDN oriChildName, LdapDN newParentName ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Moving name = '" + oriChildName.toString() + " to name = '" + newParentName + "'" );
}
@@ -404,7 +407,7 @@
public NamingEnumeration search( NextInterceptor next, LdapDN base, Map env, ExprNode filter,
SearchControls searchCtls ) throws NamingException
{
- if ( log.isDebugEnabled() )
+ if ( IS_DEBUG )
{
log.debug( "Search for base = '" + base.toString() + "'" );
}