sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1609445 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
Date Thu, 10 Jul 2014 11:33:43 GMT
Author: asanso
Date: Thu Jul 10 11:33:43 2014
New Revision: 1609445

URL: http://svn.apache.org/r1609445
Log:
SLING-3755 - ResourceResolverTest#testMapEmptyPath fails

Modified:
    sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java

Modified: sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java?rev=1609445&r1=1609444&r2=1609445&view=diff
==============================================================================
--- sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
(original)
+++ sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
Thu Jul 10 11:33:43 2014
@@ -298,6 +298,22 @@ public class MapEntries implements Event
         }
         return newRefreshed;
     }
+    
+    private boolean doUpdateConfiguration(boolean refreshed){
+        this.initializing.lock();
+        boolean newRefreshed = refreshed;
+        if (!newRefreshed) {
+            resolver.refresh();
+            newRefreshed = true;
+        }
+        try {
+            doUpdateConfiguration();
+            sendChangeEvent();
+        } finally {
+            this.initializing.unlock();
+        }
+        return newRefreshed;
+    }
 
     private void doUpdateConfiguration(){
         final List<MapEntry> globalResolveMap = new ArrayList<MapEntry>();
@@ -588,7 +604,7 @@ public class MapEntries implements Event
                 }
             }
             //need to update the configuration
-            doUpdateConfiguration();
+            doUpdateConfiguration(wasResolverRefreshed);
         } else {
             String [] addedAttributes = (String []) event.getProperty(SlingConstants.PROPERTY_ADDED_ATTRIBUTES);
             if (addedAttributes != null) {



Mime
View raw message