jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r312881 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java
Date Tue, 11 Oct 2005 13:52:02 GMT
Author: tripod
Date: Tue Oct 11 06:51:59 2005
New Revision: 312881

URL: http://svn.apache.org/viewcvs?rev=312881&view=rev
Log:
JCR-250 Access to VirtualNodeTypeStateManager.virtualProvider should be guarded

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java?rev=312881&r1=312880&r2=312881&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateManager.java
Tue Oct 11 06:51:59 2005
@@ -124,7 +124,9 @@
     public void nodeTypeRegistered(QName ntName) {
         try {
             // allow provider to update
-            virtProvider.onNodeTypeAdded(ntName);
+            if (virtProvider != null) {
+                virtProvider.onNodeTypeAdded(ntName);
+            }
 
             NodeImpl root = (NodeImpl) systemSession.getItemManager().getItem(new NodeId(rootNodeId));
             NodeImpl child = root.getNode(ntName);
@@ -155,7 +157,9 @@
             List events = new ArrayList();
             recursiveRemove(events, root, child);
             obsDispatcher.dispatch(events, systemSession);
-            virtProvider.onNodeTypeRemoved(ntName);
+            if (virtProvider != null) {
+                virtProvider.onNodeTypeRemoved(ntName);
+            }
         } catch (RepositoryException e) {
             log.error("Unable to index removed nodetype: " + e.toString());
         }



Mime
View raw message