[gatein-commits] gatein SVN: r1595 - in components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp: services and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Feb 9 17:28:15 EST 2010


Author: chris.laprun at jboss.com
Date: 2010-02-09 17:28:15 -0500 (Tue, 09 Feb 2010)
New Revision: 1595

Modified:
   components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
   components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
Log:
- Use isDebugEnabled to prevent unnecessary creation of Strings.

Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java	2010-02-09 22:25:16 UTC (rev 1594)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java	2010-02-09 22:28:15 UTC (rev 1595)
@@ -147,7 +147,7 @@
    public boolean isRefreshNeeded()
    {
       boolean result = !isAvailable();
-      if (result)
+      if (result && log.isDebugEnabled())
       {
          log.debug("Refresh needed");
       }

Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java	2010-02-09 22:25:16 UTC (rev 1594)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java	2010-02-09 22:28:15 UTC (rev 1595)
@@ -63,7 +63,10 @@
 
    public <T> T getService(Class<T> clazz) throws Exception
    {
-      log.debug("Getting service for class " + clazz);
+      if (log.isDebugEnabled())
+      {
+         log.debug("Getting service for class " + clazz);
+      }
 
       // if we need a refresh, reload information from WSDL
       if (!isAvailable() && !isFailed())
@@ -101,7 +104,10 @@
       {
          if (portAddress != null)
          {
-            log.debug("Setting the end point to: " + portAddress);
+            if (log.isDebugEnabled())
+            {
+               log.debug("Setting the end point to: " + portAddress);
+            }
             Map<String, Object> requestContext = ((BindingProvider)service).getRequestContext();
             requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, portAddress);
 



More information about the gatein-commits mailing list