You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by md...@apache.org on 2012/09/13 23:17:21 UTC
svn commit: r1384538 - in /jackrabbit/oak/trunk:
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
oak-jcr/pom.xml
Author: mduerig
Date: Thu Sep 13 21:17:21 2012
New Revision: 1384538
URL: http://svn.apache.org/viewvc?rev=1384538&view=rev
Log:
OAK-66: JCR Node Type Management
Throw repository exception when unregistering a nodetype which is in use
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
jackrabbit/oak/trunk/oak-jcr/pom.xml
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java?rev=1384538&r1=1384537&r2=1384538&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java Thu Sep 13 21:17:21 2012
@@ -84,6 +84,10 @@ class TypeValidator implements Validator
throw new CommitFailedException(
"Cannot add property '" + after.getName() + "' at " + parent.getPath(), e);
}
+ catch (IllegalStateException e) {
+ throw new CommitFailedException(
+ "Cannot add property '" + after.getName() + "' at " + parent.getPath(), e);
+ }
}
@Override
@@ -96,6 +100,10 @@ class TypeValidator implements Validator
throw new CommitFailedException(
"Cannot set property '" + after.getName() + "' at " + parent.getPath(), e);
}
+ catch (IllegalStateException e) {
+ throw new CommitFailedException(
+ "Cannot set property '" + after.getName() + "' at " + parent.getPath(), e);
+ }
}
@Override
@@ -107,6 +115,10 @@ class TypeValidator implements Validator
throw new CommitFailedException(
"Cannot remove property '" + before.getName() + "' at " + parent.getPath(), e);
}
+ catch (IllegalStateException e) {
+ throw new CommitFailedException(
+ "Cannot remove property '" + before.getName() + "' at " + parent.getPath(), e);
+ }
}
@Override
@@ -130,6 +142,10 @@ class TypeValidator implements Validator
throw new CommitFailedException(
"Cannot add node '" + name + "' at " + parent.getPath(), e);
}
+ catch (IllegalStateException e) {
+ throw new CommitFailedException(
+ "Cannot add node '" + name + "' at " + parent.getPath(), e);
+ }
}
@Override
@@ -147,6 +163,10 @@ class TypeValidator implements Validator
throw new CommitFailedException(
"Cannot remove node '" + name + "' at " + parent.getPath(), e);
}
+ catch (IllegalStateException e) {
+ throw new CommitFailedException(
+ "Cannot add node '" + name + "' at " + parent.getPath(), e);
+ }
}
//------------------------------------------------------------< private >---
Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1384538&r1=1384537&r2=1384538&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Thu Sep 13 21:17:21 2012
@@ -75,8 +75,6 @@ org.apache.jackrabbit.test.api.nodetype.
org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyNodeDefinitionTemplate <!-- OAK-66 -->
org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNodeDefinitionTemplate <!-- OAK-66 -->
org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testInvalidJCRNames <!-- OAK-66 -->
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testUnregisterNodeType <!-- OAK-66 -->
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testUnregisterNodeTypes <!-- OAK-66 -->
org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest#testValueConstraintViolationExceptionBecauseOfInvalidTypeParameter
org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest#testValuesConstraintViolationExceptionBecauseOfInvalidTypeParameter
org.apache.jackrabbit.test.api.SetPropertyAssumeTypeTest#testStringConstraintViolationExceptionBecauseOfInvalidTypeParameter