jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r543119 - /jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
Date Thu, 31 May 2007 11:53:16 GMT
Author: angela
Date: Thu May 31 04:53:16 2007
New Revision: 543119

URL: http://svn.apache.org/viewvc?view=rev&rev=543119
Log:
PropertyImpl.getLength(QValue) does not deal with all property types.

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

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java?view=diff&rev=543119&r1=543118&r2=543119
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
Thu May 31 04:53:16 2007
@@ -356,17 +356,15 @@
      * @throws RepositoryException
      */
     private long getLength(QValue value) throws RepositoryException {
-        long length = UNDEFINED_PROPERTY_LENGTH;
+        long length;
         switch (value.getType()) {
-            case PropertyType.STRING:
-            case PropertyType.BINARY:
-            case PropertyType.LONG:
-            case PropertyType.DOUBLE:
-                length = value.getLength();
-                break;
             case PropertyType.NAME:
+            case PropertyType.PATH:
                 Value jcrValue = ValueFormat.getJCRValue(value, session.getNamespaceResolver(),
session.getJcrValueFactory());
                 length = jcrValue.getString().length();
+                break;
+            default:
+                length = value.getLength();
                 break;
         }
         return length;



Mime
View raw message