jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r945892 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
Date Tue, 18 May 2010 21:17:46 GMT
Author: tripod
Date: Tue May 18 21:17:46 2010
New Revision: 945892

URL: http://svn.apache.org/viewvc?rev=945892&view=rev
Log:
JCR-2634 weird error when adding a node using an abstract/mixin nodetype

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java?rev=945892&r1=945891&r2=945892&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/EffectiveNodeTypeImpl.java
Tue May 18 21:17:46 2010
@@ -365,10 +365,10 @@ public class EffectiveNodeTypeImpl imple
     public void checkAddNodeConstraints(Name name, QNodeTypeDefinition nodeTypeDefinition,
ItemDefinitionProvider definitionProvider)
             throws ConstraintViolationException, NoSuchNodeTypeException {
         if (nodeTypeDefinition.isAbstract()) {
-            throw new ConstraintViolationException(name + " is abstract  be used as primary
node type.");
+            throw new ConstraintViolationException("not allowed to add node " + name + ":
" + nodeTypeDefinition.getName() + " is abstract and cannot be used as primary node type.");
         }
         if (nodeTypeDefinition.isMixin()) {
-            throw new ConstraintViolationException(name + " is abstract and cannot be used
as primary node type.");
+            throw new ConstraintViolationException("not allowed to add node " + name + ":"
+ nodeTypeDefinition.getName() + " is a mixin and cannot be used as primary node type.");
         }
         QNodeDefinition nd = definitionProvider.getQNodeDefinition(this, name, nodeTypeDefinition.getName());
         if (nd.isProtected()) {



Mime
View raw message