You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2007/07/02 04:21:13 UTC

svn commit: r552383 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java

Author: dims
Date: Sun Jul  1 19:21:12 2007
New Revision: 552383

URL: http://svn.apache.org/viewvc?view=rev&rev=552383
Log:
reduce # of calls to isDebugEnabled()

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java?view=diff&rev=552383&r1=552382&r2=552383
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java Sun Jul  1 19:21:12 2007
@@ -264,7 +264,8 @@
      * @throws org.apache.axis2.AxisFault
      */
     public final InvocationResponse invoke(MessageContext msgctx) throws AxisFault {
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+        boolean isDebugEnabled = LoggingControl.debugLoggingAllowed && log.isDebugEnabled();
+        if (isDebugEnabled) {
             log.debug(msgctx.getLogIDString() + " Checking pre-condition for Phase \"" + phaseName +
                     "\"");
         }
@@ -277,14 +278,14 @@
             checkPreconditions(msgctx);
         }
 
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+        if (isDebugEnabled) {
             log.debug(msgctx.getLogIDString() + " Invoking phase \"" + phaseName + "\"");
         }
 
         while (currentIndex < handlers.size()) {
             Handler handler = (Handler) handlers.get(currentIndex);
 
-            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug(msgctx.getLogIDString() + " Invoking Handler '" + handler.getName() +
                         "' in Phase '" + phaseName + "'");
             }
@@ -298,7 +299,7 @@
             msgctx.setCurrentPhaseIndex(currentIndex);
         }
 
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+        if (isDebugEnabled) {
             log.debug(msgctx.getLogIDString() + " Checking post-conditions for phase \"" +
                     phaseName + "\"");
         }
@@ -309,7 +310,8 @@
     }
 
     public void flowComplete(MessageContext msgContext) {
-        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+        boolean isDebugEnabled = LoggingControl.debugLoggingAllowed && log.isDebugEnabled();
+        if (isDebugEnabled) {
             log.debug(msgContext.getLogIDString() + " Invoking flowComplete() in Phase \"" +
                     phaseName + "\"");
         }
@@ -328,7 +330,7 @@
         for (; currentHandlerIndex > 0; currentHandlerIndex--) {
             Handler handler = (Handler) handlers.get(currentHandlerIndex - 1);
 
-            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug(msgContext.getLogIDString() + " Invoking flowComplete() for Handler '" +
                         handler.getName() + "' in Phase '" + phaseName + "'");
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org