jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1422002 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
Date Fri, 14 Dec 2012 17:54:42 GMT
Author: angela
Date: Fri Dec 14 17:54:41 2012
New Revision: 1422002

URL: http://svn.apache.org/viewvc?rev=1422002&view=rev
Log:
minor improvement: remove redundant test for null definition

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java?rev=1422002&r1=1422001&r2=1422002&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/EffectiveNodeTypeImpl.java
Fri Dec 14 17:54:41 2012
@@ -242,9 +242,6 @@ class EffectiveNodeTypeImpl implements E
     @Override
     public void checkAddChildNode(String name, NodeType nodeType) throws RepositoryException
{
         NodeDefinition definition = getDefinition(name, nodeType);
-        if (definition == null) {
-            throw new ConstraintViolationException("No matching node definition found for
" + name);
-        }
 
         if (definition.isProtected()) {
             return;
@@ -264,9 +261,6 @@ class EffectiveNodeTypeImpl implements E
     @Override
     public void checkRemoveNode(String name, NodeType nodeType) throws RepositoryException
{
         NodeDefinition definition = getDefinition(name, nodeType);
-        if (definition == null) {
-            throw new ConstraintViolationException("No matching node definition found for
" + name);
-        }
 
         if (definition.isProtected()) {
             return;



Mime
View raw message