sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1777542 - /sling/trunk/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java
Date Fri, 06 Jan 2017 09:06:34 GMT
Author: cziegeler
Date: Fri Jan  6 09:06:34 2017
New Revision: 1777542

URL: http://svn.apache.org/viewvc?rev=1777542&view=rev
Log:
SLING-6441 : NPE while processing mapping events

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=1777542&r1=1777541&r2=1777542&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
Fri Jan  6 09:06:34 2017
@@ -481,7 +481,7 @@ public class MapEntries implements
             final String containingResourceName = containingResource.getName();
             final String parentPath = ResourceUtil.getParent(containingResource.getPath());
 
-            final Map<String, String> aliasMapEntry = aliasMap.get(parentPath);
+            final Map<String, String> aliasMapEntry = parentPath == null ? null : aliasMap.get(parentPath);
             if (aliasMapEntry != null) {
                 for (Iterator<Map.Entry<String, String>> iterator = aliasMapEntry.entrySet().iterator();
iterator.hasNext(); ) {
                     final Map.Entry<String, String> entry = iterator.next();



Mime
View raw message