jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1574971 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeEditor.java
Date Thu, 06 Mar 2014 17:26:12 GMT
Author: jukka
Date: Thu Mar  6 17:26:12 2014
New Revision: 1574971

URL: http://svn.apache.org/r1574971
Log:
OAK-1013: Node.addNode(name) different behavior from JR if NodeType resolves to an abstract

We should still catch abstract mixin types, as they are always explicitly specified.

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=1574971&r1=1574970&r2=1574971&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
Thu Mar  6 17:26:12 2014
@@ -264,11 +264,10 @@ class TypeEditor extends DefaultEditor {
             } else if (!type.getBoolean(JCR_ISMIXIN)) {
                 throw constraintViolation(
                         6, "Primary type " + mixin + " used as a mixin type");
+            } else if (type.getBoolean(JCR_IS_ABSTRACT)) {
+                throw constraintViolation(
+                        7, "Abstract type " + mixin + " used as a mixin type");
             } else {
-                if (type.getBoolean(JCR_IS_ABSTRACT)) {
-                    log.warn("Abstract type " + mixin
-                            + " used as a mixin type of node " + getPath());
-                }
                 list.add(type);
             }
         }



Mime
View raw message