jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r679389 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle: AbstractBundlePersistenceManager.java util/BundleBinding.java
Date Thu, 24 Jul 2008 12:30:53 GMT
Author: stefan
Date: Thu Jul 24 05:30:53 2008
New Revision: 679389

URL: http://svn.apache.org/viewvc?rev=679389&view=rev
Log:
JCR-1632: Mixin type loss

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=679389&r1=679388&r2=679389&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
Thu Jul 24 05:30:53 2008
@@ -562,7 +562,7 @@
                 bundle.update((NodeState) state);
             } else {
                 PropertyId id = (PropertyId) state.getId();
-                // skip primaryType pr mixinTypes properties
+                // skip redundant primaryType, mixinTypes and uuid properties
                 if (id.getName().equals(NameConstants.JCR_PRIMARYTYPE)
                     || id.getName().equals(NameConstants.JCR_MIXINTYPES)
                     || id.getName().equals(NameConstants.JCR_UUID)) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java?rev=679389&r1=679388&r2=679389&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
Thu Jul 24 05:30:53 2008
@@ -31,6 +31,7 @@
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
+import org.apache.jackrabbit.spi.commons.name.NameConstants;
 
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
@@ -114,6 +115,12 @@
         // properties
         name = readIndexedQName(in);
         while (name != null) {
+            // skip redundant primaryType, mixinTypes and uuid properties
+            if (name.equals(NameConstants.JCR_PRIMARYTYPE)
+                || name.equals(NameConstants.JCR_MIXINTYPES)
+                || name.equals(NameConstants.JCR_UUID)) {
+                continue;
+            }
             PropertyId pId = new PropertyId(bundle.getId(), name);
             NodePropBundle.PropertyEntry pState = readPropertyEntry(in, pId);
             bundle.addProperty(pState);
@@ -278,6 +285,12 @@
         iter = bundle.getPropertyNames().iterator();
         while (iter.hasNext()) {
             Name pName = (Name) iter.next();
+            // skip redundant primaryType, mixinTypes and uuid properties
+            if (pName.equals(NameConstants.JCR_PRIMARYTYPE)
+                || pName.equals(NameConstants.JCR_MIXINTYPES)
+                || pName.equals(NameConstants.JCR_UUID)) {
+                continue;
+            }
             NodePropBundle.PropertyEntry pState = bundle.getPropertyEntry(pName);
             if (pState == null) {
                 log.error("PropertyState missing in bundle: " + pName);



Mime
View raw message