jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1378871 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Date Thu, 30 Aug 2012 09:48:54 GMT
Author: jukka
Date: Thu Aug 30 09:48:54 2012
New Revision: 1378871

URL: http://svn.apache.org/viewvc?rev=1378871&view=rev
Log:
OAK-66: JCR Node Type Management

Temporary fallback for cases where content doesn't match type defintions.

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java?rev=1378871&r1=1378870&r2=1378871&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Thu Aug 30 09:48:54 2012
@@ -571,6 +571,18 @@ public class PropertyImpl extends ItemIm
             }
         }
 
+        // FIXME: Shouldn't be needed
+        for (NodeType nt : getAllNodeTypes(getParent())) {
+            for (PropertyDefinition def : nt.getDeclaredPropertyDefinitions()) {
+                String defName = def.getName();
+                if ((name.equals(defName) || "*".equals(defName))
+                        && type == PropertyType.STRING
+                        && isMultiple() == def.isMultiple()) {
+                    return def;
+                }
+            }
+        }
+
         throw new RepositoryException(
                 "No matching property definition found for " + this);
     }



Mime
View raw message