jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1408234 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java
Date Mon, 12 Nov 2012 09:49:15 GMT
Author: mreutegg
Date: Mon Nov 12 09:49:14 2012
New Revision: 1408234

URL: http://svn.apache.org/viewvc?rev=1408234&view=rev
Log:
OAK-437: PropertyDefinition.getValueConstraints() returns null when no constraint is available.


Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java?rev=1408234&r1=1408233&r2=1408234&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/PropertyDefinitionImpl.java
Mon Nov 12 09:49:14 2012
@@ -138,7 +138,11 @@ class PropertyDefinitionImpl extends Ite
     @Override
     public String[] getValueConstraints() {
         // TODO: namespace mapping?
-        return node.getStrings("jcr:valueConstraints");
+        String[] constraints = node.getStrings("jcr:valueConstraints");
+        if (constraints == null) {
+            constraints = new String[0];
+        }
+        return constraints;
     }
 
     @Override



Mime
View raw message