jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r409630 - /jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Date Fri, 26 May 2006 10:40:01 GMT
Author: jukka
Date: Fri May 26 03:40:01 2006
New Revision: 409630

URL: http://svn.apache.org/viewvc?rev=409630&view=rev
Log:
1.0: Merged revision 408873: JCR-437

Modified:
    jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java

Modified: jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=409630&r1=409629&r2=409630&view=diff
==============================================================================
--- jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/branches/1.0/jackrabbit/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Fri May 26 03:40:01 2006
@@ -3804,9 +3804,12 @@
                 // only remove OPV=Copy nodes
                 n.internalRemove(true);
             } else if (n.getDefinition().getOnParentVersion() == OnParentVersionAction.VERSION)
{
-                // only remove, if node to be restored does not contain child
-                UUID vhUUID = new UUID(n.getProperty(QName.JCR_VERSIONHISTORY).getString());
-                if (!freeze.hasFrozenHistory(vhUUID)) {
+                // only remove, if node to be restored does not contain child,
+                // or if restored child is not versionable
+                UUID vhUUID = n.hasProperty(QName.JCR_VERSIONHISTORY)
+                        ? new UUID(n.getProperty(QName.JCR_VERSIONHISTORY).getString())
+                        : null;
+                if (vhUUID == null || !freeze.hasFrozenHistory(vhUUID)) {
                     n.internalRemove(true);
                 }
             }



Mime
View raw message