ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r491611 - /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
Date Mon, 01 Jan 2007 18:42:46 GMT
Author: dims
Date: Mon Jan  1 10:42:46 2007
New Revision: 491611

URL: http://svn.apache.org/viewvc?view=rev&rev=491611
Log:
check isDebugEnabled only once

Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java?view=diff&rev=491611&r1=491610&r2=491611
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
Mon Jan  1 10:42:46 2007
@@ -26,6 +26,7 @@
 public class AddressingHelper {
 
     private static final Log log = LogFactory.getLog(AddressingHelper.class);
+    private static final boolean isDebugEnabled = log.isDebugEnabled();
 
     /**
      * Returns true if the ReplyTo address does not match one of the supported
@@ -38,7 +39,7 @@
     public static boolean isReplyRedirected(MessageContext messageContext) {
         EndpointReference replyTo = messageContext.getReplyTo();
         if (replyTo == null) {
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("isReplyRedirected: ReplyTo is null. Returning false");
             }
             return false;
@@ -58,7 +59,7 @@
     public static boolean isFaultRedirected(MessageContext messageContext) {
         EndpointReference faultTo = messageContext.getFaultTo();
         if (faultTo == null) {
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("isReplyRedirected: FaultTo is null. Returning isReplyRedirected");
             }
             return isReplyRedirected(messageContext);
@@ -77,7 +78,7 @@
         String value = "";
         if (axisOperation != null) {
             value = Utils.getParameterValue(axisOperation.getParameter(AddressingConstants.WSAW_ANONYMOUS_PARAMETER_NAME));
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("getAnonymousParameterValue: value: '" + value + "'");
             }
         }
@@ -98,7 +99,7 @@
      */
     public static void setAnonymousParameterValue(AxisOperation axisOperation, String value)
{
         if (value == null) {
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("setAnonymousParameterValue: value passed in is null. return");
             }
             return;
@@ -107,12 +108,12 @@
         Parameter param = axisOperation.getParameter(AddressingConstants.WSAW_ANONYMOUS_PARAMETER_NAME);
         // If an existing parameter exists
         if (param != null) {
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("setAnonymousParameterValue: Parameter already exists");
             }
             // and is not locked
             if (!param.isLocked()) {
-                if (log.isDebugEnabled()) {
+                if (isDebugEnabled) {
                     log.debug("setAnonymousParameterValue: Parameter not locked. Setting
value: " + value);
                 }
                 // set the value
@@ -120,7 +121,7 @@
             }
         } else {
             // otherwise, if no Parameter exists
-            if (log.isDebugEnabled()) {
+            if (isDebugEnabled) {
                 log.debug("setAnonymousParameterValue: Parameter does not exist");
             }
             // Create new Parameter with correct name/value
@@ -128,7 +129,7 @@
             param.setName(AddressingConstants.WSAW_ANONYMOUS_PARAMETER_NAME);
             param.setValue(value);
             try {
-                if (log.isDebugEnabled()) {
+                if (isDebugEnabled) {
                     log.debug("setAnonymousParameterValue: Adding parameter with value: "
+ value);
                 }
                 // and add it to the AxisOperation object
@@ -137,7 +138,7 @@
                 // This should not happen. AxisFault is only ever thrown when a locked Parameter
                 // of the same name already exists and this should be dealt with by the outer
                 // if statement.
-                if (log.isDebugEnabled()) {
+                if (isDebugEnabled) {
                     log.debug("setAnonymousParameterValue: addParameter failed: " + af.getMessage());
                 }
             }



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


Mime
View raw message