This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resourceresolver-1.0.4
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git

commit 489c424580509485e9ab9931b8d464f546a1dd1d
Author: Carsten Ziegeler <cziege...@apache.org>
AuthorDate: Thu Jan 24 17:18:30 2013 +0000

    SLING-2714 : Wrap LOGGER.debug calls in ResourceProviderEntry. Applied 
modified patch from Alexander Muthmann
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/resourceresolver@1438079 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../resourceresolver/impl/tree/ResourceProviderEntry.java      | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
 
b/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
index b8079c7..f66e6eb 100644
--- 
a/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
+++ 
b/src/main/java/org/apache/sling/resourceresolver/impl/tree/ResourceProviderEntry.java
@@ -227,7 +227,7 @@ public class ResourceProviderEntry implements 
Comparable<ResourceProviderEntry>
             // 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 implements 
Comparable<ResourceProviderEntry>
                     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;
                         }
                     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Reply via email to