jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1384538 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java oak-jcr/pom.xml
Date Thu, 13 Sep 2012 21:17:21 GMT
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



Mime
View raw message