jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r190591 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
Date Tue, 14 Jun 2005 13:43:16 GMT
Author: tripod
Date: Tue Jun 14 06:43:15 2005
New Revision: 190591

URL: http://svn.apache.org/viewcvs?rev=190591&view=rev
Log:
- adding fallback when unregistering custom nodetype.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?rev=190591&r1=190590&r2=190591&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Tue Jun 14
06:43:15 2005
@@ -118,8 +118,15 @@
                        ItemLifeCycleListener[] listeners)
             throws RepositoryException {
         super(itemMgr, session, id, state, listeners);
-        nodeType = session.getNodeTypeManager().getNodeType(state.getNodeTypeName());
         this.definition = definition;
+        NodeTypeImpl nt;
+        try {
+            nt = session.getNodeTypeManager().getNodeType(state.getNodeTypeName());
+        } catch (NoSuchNodeTypeException e) {
+            log.warn("Fallback to nt:unstructured for unknown node type '" + state.getNodeTypeName()
+ "' of node " +safeGetJCRPath());
+            nt = session.getNodeTypeManager().getNodeType(NT_UNSTRUCTURED);
+        }
+        this.nodeType = nt;
     }
 
     /**



Mime
View raw message