jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r559802 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Date Thu, 26 Jul 2007 13:07:47 GMT
Author: reschke
Date: Thu Jul 26 06:07:46 2007
New Revision: 559802

URL: http://svn.apache.org/viewvc?view=rev&rev=559802
Log:
JCR-1036: make sure that when the property type is only implied, a best effort value conversion
still can occur (thanks to Angela).

Modified:
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?view=diff&rev=559802&r1=559801&r2=559802
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Thu Jul 26 06:07:46 2007
@@ -332,8 +332,8 @@
      */
     public Property setProperty(String name, String value) throws ValueFormatException, VersionException,
LockException, ConstraintViolationException, RepositoryException {
         // validation performed in subsequent method
-        // best-effort conversion if the target property is not of type STRING
-        return setProperty(name, value, PropertyType.STRING);
+        Value v = (value == null) ? null : session.getValueFactory().createValue(value, PropertyType.STRING);
+        return setProperty(name, v, PropertyType.UNDEFINED);
     }
 
     /**



Mime
View raw message