jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r161985 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
Date Tue, 19 Apr 2005 21:48:51 GMT
Author: tripod
Date: Tue Apr 19 14:48:50 2005
New Revision: 161985

URL: http://svn.apache.org/viewcvs?view=rev&rev=161985
Log:
- guard conversion if type is UNDEFINED

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?view=diff&r1=161984&r2=161985
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Tue Apr 19
14:48:50 2005
@@ -1890,7 +1890,11 @@
         BitSet status = new BitSet();
         PropertyImpl prop = getOrCreateProperty(name, type, true, status);
         try {
-            prop.setValue(ValueHelper.convert(values, type));
+            if (type == PropertyType.UNDEFINED) {
+                prop.setValue(values);
+            } else {
+                prop.setValue(ValueHelper.convert(values, type));
+            }
         } catch (RepositoryException re) {
             if (status.get(CREATED)) {
                 // setting value failed, get rid of newly created property
@@ -1937,7 +1941,11 @@
         BitSet status = new BitSet();
         PropertyImpl prop = getOrCreateProperty(name, type, false, status);
         try {
-            prop.setValue(ValueHelper.convert(value, type));
+            if (type == PropertyType.UNDEFINED) {
+                prop.setValue(value);
+            } else {
+                prop.setValue(ValueHelper.convert(value, type));
+            }
         } catch (RepositoryException re) {
             if (status.get(CREATED)) {
                 // setting value failed, get rid of newly created property



Mime
View raw message