incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1605714 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
Date Thu, 26 Jun 2014 09:12:58 GMT
Author: asanso
Date: Thu Jun 26 09:12:58 2014
New Revision: 1605714

URL: http://svn.apache.org/r1605714
Log:
SLING-3702 - ResourceResolverTest.testResolveRemovedResourceAlias fails: Timeout waiting for
org/apache/sling/api/resource/ResourceResolverMapping/CHANGED event, after 10000 msec

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=1605714&r1=1605713&r2=1605714&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 Jun 26 09:12:58 2014
@@ -328,18 +328,20 @@ public class MapEntries implements Event
 
         String actualContentPath = getActualContentPath(path);
         List<String> vanityPaths = vanityTargets.get(actualContentPath);
-        boolean updatedOrder = false;
-        for (String vanityTarget : vanityPaths) {
-            List<MapEntry> entries = this.resolveMapsMap.get(vanityTarget);
-            for (MapEntry entry : entries) {
-                String redirect = getMapEntryRedirect(entry);
-                if (redirect != null && redirect.equals(actualContentPath)) {
-                    entry.setOrder(vanityOrder);
-                    updatedOrder = true;
+        if (vanityPaths != null) {
+            boolean updatedOrder = false;
+            for (String vanityTarget : vanityPaths) {
+                List<MapEntry> entries = this.resolveMapsMap.get(vanityTarget);
+                for (MapEntry entry : entries) {
+                    String redirect = getMapEntryRedirect(entry);
+                    if (redirect != null && redirect.equals(actualContentPath)) {
+                        entry.setOrder(vanityOrder);
+                        updatedOrder = true;
+                    }
+                }
+                if (updatedOrder) {
+                    Collections.sort(entries);
                 }
-            }
-            if (updatedOrder) {
-                Collections.sort(entries);
             }
         }
     }



Mime
View raw message