incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1438079 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
Date Thu, 24 Jan 2013 17:18:30 GMT
Author: cziegeler
Date: Thu Jan 24 17:18:30 2013
New Revision: 1438079

URL: http://svn.apache.org/viewvc?rev=1438079&view=rev
Log:
SLING-2714 : Wrap LOGGER.debug calls in ResourceProviderEntry. Applied modified patch from
Alexander Muthmann

Modified:
    sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java

Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java?rev=1438079&r1=1438078&r2=1438079&view=diff
==============================================================================
--- sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
(original)
+++ sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
Thu Jan 24 17:18:30 2013
@@ -227,7 +227,7 @@ public class ResourceProviderEntry imple
             // the last element is a perfect match;
             result = entries.get(entries.size() - 1).removeInternalProvider(resourceProvider);
         }
-        
+
         if(!result) {
             // bad news - the provider might be an OSGi service being deactivated,
             // so this should be taken care of.
@@ -299,12 +299,16 @@ public class ResourceProviderEntry imple
                     final Resource resource = rp.getResource(ctx, resourceResolver, fullPath);
                     if (resource != null) {
                         if ( resource.getResourceMetadata() != null && resource.getResourceMetadata().get(ResourceMetadata.INTERNAL_CONTINUE_RESOLVING)
!= null ) {
-                            LOGGER.debug("Resolved Full {} using {} from {} - continue resolving
flag is set!", new Object[] { fullPath, rp, Arrays.toString(rps) });
+                            if ( LOGGER.isDebugEnabled() ) {
+                                LOGGER.debug("Resolved Full {} using {} from {} - continue
resolving flag is set!", new Object[] { fullPath, rp, Arrays.toString(rps) });
+                            }
                             fallbackResource = resource;
                             fallbackResource.getResourceMetadata().remove(ResourceMetadata.INTERNAL_CONTINUE_RESOLVING);
                             foundFallback = true;
                         } else {
-                            LOGGER.debug("Resolved Full {} using {} from {} ", new Object[]
{ fullPath, rp, Arrays.toString(rps) });
+                            if ( LOGGER.isDebugEnabled() ) {
+                                LOGGER.debug("Resolved Full {} using {} from {} ", new Object[]
{ fullPath, rp, Arrays.toString(rps) });
+                            }
                             return resource;
                         }
                     }



Mime
View raw message