cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amic...@apache.org
Subject svn commit: r1487689 - in /cxf/dosgi/trunk: discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/...
Date Thu, 30 May 2013 00:20:50 GMT
Author: amichai
Date: Thu May 30 00:20:50 2013
New Revision: 1487689

URL: http://svn.apache.org/r1487689
Log:
Remove redundant LOG.isDebugEnabled() checks

Modified:
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
    cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/EndpointListenerTrackerCustomizer.java
Thu May 30 00:20:50 2013
@@ -63,9 +63,7 @@ public class EndpointListenerTrackerCust
 
         for (String scope : Util.getScopes(sref)) {
             String objClass = getObjectClass(scope);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Adding interest in scope: " + scope + " objectClass: " + objClass);
-            }
+            LOG.debug("Adding interest in scope {}, objectClass {}", scope, objClass);
             imManager.addInterest(sref, scope, objClass);
         }
     }
@@ -81,7 +79,7 @@ public class EndpointListenerTrackerCust
     }
 
     public void removedService(ServiceReference sref, Object service) {
-        LOG.info("removedService: " + sref);
+        LOG.info("removedService: {}", sref);
         imManager.removeInterest(sref);
     }
 

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/InterfaceMonitor.java
Thu May 30 00:20:50 2013
@@ -62,10 +62,8 @@ public class InterfaceMonitor implements
         this.znode = Util.getZooKeeperPath(intf);
         this.recursive = intf == null || intf.isEmpty();
         this.epListener = epListener;
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Creating new InterfaceMonitor " + (recursive ? "(recursive)" : "")
-                + " for scope [" + scope + "] and objectClass [" + intf + "]");
-        }
+        LOG.debug("Creating new InterfaceMonitor {} for scope [{}] and objectClass [{}]",
+                new Object[] {recursive ? "(recursive)" : "", scope, intf});
     }
 
     public void start() {
@@ -182,9 +180,7 @@ public class InterfaceMonitor implements
                     newNodes.put(child, epd);
                     prevNodes.remove(child);
                     foundANode = true;
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Properties: " + epd.getProperties());
-                    }
+                    LOG.debug("Properties: {}", epd.getProperties());
                     if (prevEpd == null) {
                         // This guy is new
                         epListener.endpointAdded(epd, null);

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/PublishingEndpointListener.java
Thu May 30 00:20:50 2013
@@ -58,7 +58,7 @@ public class PublishingEndpointListener 
     }
 
     public void endpointAdded(EndpointDescription endpoint, String matchedFilter) {
-        LOG.info("Local EndpointDescription added: " + endpoint);
+        LOG.info("Local EndpointDescription added: {}", endpoint);
 
         synchronized (endpoints) {
             if (closed) {
@@ -105,7 +105,7 @@ public class PublishingEndpointListener 
     }
 
     public void endpointRemoved(EndpointDescription endpoint, String matchedFilter) {
-        LOG.info("Local EndpointDescription removed: " + endpoint);
+        LOG.info("Local EndpointDescription removed: {}", endpoint);
 
         synchronized (endpoints) {
             if (closed) {

Modified: cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
(original)
+++ cxf/dosgi/trunk/discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/ZooKeeperDiscovery.java
Thu May 30 00:20:50 2013
@@ -55,9 +55,7 @@ public class ZooKeeperDiscovery implemen
 
     @SuppressWarnings("rawtypes")
     public synchronized void updated(Dictionary configuration) throws ConfigurationException
{
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Received configuration update for Zookeeper Discovery: " + configuration);
-        }
+        LOG.debug("Received configuration update for Zookeeper Discovery: {}", configuration);
 
         stop();
 

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
Thu May 30 00:20:50 2013
@@ -65,10 +65,8 @@ public class EventProducer {
             if (listenerRefs != null) {
                 for (ServiceReference sref : listenerRefs) {
                     RemoteServiceAdminListener rsal = (RemoteServiceAdminListener)bctx.getService(sref);
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("notify RemoteServiceAdminListener {} of bundle {}", rsal,
-                                  sref.getBundle().getSymbolicName());
-                    }
+                    LOG.debug("notify RemoteServiceAdminListener {} of bundle {}",
+                            rsal, sref.getBundle().getSymbolicName());
                     rsal.remoteAdminEvent(rsae);
                 }
             }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
Thu May 30 00:20:50 2013
@@ -393,10 +393,8 @@ public class RemoteServiceAdminCore impl
             ServiceRegistration proxyReg = actualContext.registerService(interfaceName, csf,
serviceProps);
             imReg.setImportedServiceRegistration(proxyReg);
         } catch (Exception ex) {
-            if (LOG.isDebugEnabled()) {
-                // Only logging at debug level as this might be written to the log at the
TopologyManager
-                LOG.debug("Can not proxy service with interface " + interfaceName + ": "
+ ex.getMessage(), ex);
-            }
+            // Only logging at debug level as this might be written to the log at the TopologyManager
+            LOG.debug("Can not proxy service with interface " + interfaceName + ": " + ex.getMessage(),
ex);
             imReg.setException(ex);
         }
     }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
Thu May 30 00:20:50 2013
@@ -141,9 +141,7 @@ public final class OsgiUtils {
                 for (ExportedPackage p : ep) {
                     if (p != null
                         && pack.equals(p.getName())) {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("found package -> Version: {}", p.getVersion());
-                        }
+                        LOG.debug("found package -> Version: {}", p.getVersion());
                         return p.getVersion().toString();
                     }
                 }

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/EndpointListenerManager.java
Thu May 30 00:20:50 2013
@@ -83,9 +83,7 @@ public class EndpointListenerManager {
         Dictionary<String, Object> p = new Hashtable<String, Object>();
 
         synchronized (filters) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Current filter: " + filters);
-            }
+            LOG.debug("Current filter: {}", filters);
             p.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, new ArrayList<String>(filters));
         }
 

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java?rev=1487689&r1=1487688&r2=1487689&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/importer/ListenerHookImpl.java
Thu May 30 00:20:50 2013
@@ -66,9 +66,7 @@ public class ListenerHookImpl implements
 
     @SuppressWarnings("rawtypes")
     public void added(Collection/* <ListenerInfo> */ listeners) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("added listeners {}", listeners);
-        }
+        LOG.debug("added listeners {}", listeners);
         for (Object li : listeners) {
             ListenerInfo listenerInfo = (ListenerInfo)li;
             LOG.debug("Filter {}", listenerInfo.getFilter());
@@ -98,9 +96,7 @@ public class ListenerHookImpl implements
 
     @SuppressWarnings("rawtypes")
     public void removed(Collection/* <ListenerInfo> */ listeners) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("removed: " + listeners);
-        }
+        LOG.debug("removed listeners {}", listeners);
 
         for (Object li : listeners) {
             ListenerInfo listenerInfo = (ListenerInfo)li;



Mime
View raw message