jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1477927 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
Date Wed, 01 May 2013 08:07:31 GMT
Author: jukka
Date: Wed May  1 08:07:30 2013
New Revision: 1477927

URL: http://svn.apache.org/r1477927
Log:
OAK-802: Occasional type validation errors in TCK setup

Improved error reporting

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java?rev=1477927&r1=1477926&r2=1477927&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
Wed May  1 08:07:30 2013
@@ -120,8 +120,10 @@ class TypeEditor extends DefaultEditor {
         // TODO: this should be in childNodeAdded()
         if (parent != null && parent.effective.getDefinition(
                 nodeName, effective.getTypeNames()) == null) {
+            Set<String> parentTypes = parent.effective.getTypeNames();
             throw constraintViolation(
-                    1, "Incorrect node type of child node " + nodeName);
+                    1, "No matching child node definition found for child node "
+                    + nodeName + " in any of the parent types " + parentTypes);
         }
     }
 
@@ -140,7 +142,7 @@ class TypeEditor extends DefaultEditor {
 
     private CommitFailedException constraintViolation(int code, String message) {
         return new CommitFailedException(
-                CONSTRAINT, code, getPath() + ": " + message + " " + typeNames);
+                CONSTRAINT, code, getPath() + typeNames + ": " + message);
     }
 
     @Override



Mime
View raw message