incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1171235 - /sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java
Date Thu, 15 Sep 2011 19:31:27 GMT
Author: justin
Date: Thu Sep 15 19:31:27 2011
New Revision: 1171235

URL: http://svn.apache.org/viewvc?rev=1171235&view=rev
Log:
SLING-2222 - adding null check for namespaceMapperTracker

Modified:
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java?rev=1171235&r1=1171234&r2=1171235&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java
(original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractNamespaceMappingRepository.java
Thu Sep 15 19:31:27 2011
@@ -68,11 +68,13 @@ public abstract class AbstractNamespaceM
             localHandler.defineNamespacePrefixes(session);
         }
 
-        // call namespace mappers
-        final Object[] nsMappers = namespaceMapperTracker.getServices();
-        if (nsMappers != null) {
-            for (int i = 0; i < nsMappers.length; i++) {
-                ((NamespaceMapper) nsMappers[i]).defineNamespacePrefixes(session);
+        if (namespaceMapperTracker != null) {
+            // call namespace mappers
+            final Object[] nsMappers = namespaceMapperTracker.getServices();
+            if (nsMappers != null) {
+                for (int i = 0; i < nsMappers.length; i++) {
+                    ((NamespaceMapper) nsMappers[i]).defineNamespacePrefixes(session);
+                }
             }
         }
     }



Mime
View raw message