jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r332593 - /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
Date Fri, 11 Nov 2005 16:34:27 GMT
Author: stefan
Date: Fri Nov 11 08:34:25 2005
New Revision: 332593

URL: http://svn.apache.org/viewcvs?rev=332593&view=rev
Log:
Node.checkin() had unwanted side effects on the property content being versioned

see http://mail-archives.apache.org/mod_mbox/incubator-jackrabbit-dev/200511.mbox/%3c000001c5e5f2$938db070$bdc8a8c0@asterix%3e

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java?rev=332593&r1=332592&r2=332593&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/NodeStateEx.java
Fri Nov 11 08:34:25 2005
@@ -565,9 +565,13 @@
             } else {
                 type = prop.getDefinition().getRequiredType();
             }
-            setPropertyValues(prop.getQName(), type, values);
+            InternalValue[] copiedValues = new InternalValue[values.length];
+            for (int i = 0; i < values.length; i++) {
+                copiedValues[i] = values[i].createCopy();
+            }
+            setPropertyValues(prop.getQName(), type, copiedValues);
         } else {
-            setPropertyValue(prop.getQName(), prop.internalGetValue());
+            setPropertyValue(prop.getQName(), prop.internalGetValue().createCopy());
         }
     }
 



Mime
View raw message