jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1393964 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java
Date Thu, 04 Oct 2012 09:13:25 GMT
Author: mreutegg
Date: Thu Oct  4 09:13:25 2012
New Revision: 1393964

URL: http://svn.apache.org/viewvc?rev=1393964&view=rev
Log:
OAK-360: TypeValidator must ignore childOrder property

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/TypeValidator.java

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=1393964&r1=1393963&r2=1393964&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 Oct  4 09:13:25 2012
@@ -73,6 +73,9 @@ class TypeValidator implements Validator
 
     @Override
     public void propertyAdded(PropertyState after) throws CommitFailedException {
+        if (isInternal(after)) {
+            return;
+        }
         try {
             checkType(after);
             getParentType().checkSetProperty(after);
@@ -89,6 +92,9 @@ class TypeValidator implements Validator
 
     @Override
     public void propertyChanged(PropertyState before, PropertyState after) throws CommitFailedException
{
+        if (isInternal(after)) {
+            return;
+        }
         try {
             checkType(after);
             getParentType().checkSetProperty(after);
@@ -105,6 +111,9 @@ class TypeValidator implements Validator
 
     @Override
     public void propertyDeleted(PropertyState before) throws CommitFailedException {
+        if (isInternal(before)) {
+            return;
+        }
         try {
             getParentType().checkRemoveProperty(before);
         }
@@ -168,6 +177,10 @@ class TypeValidator implements Validator
 
     //------------------------------------------------------------< private >---
 
+    private static boolean isInternal(PropertyState state) {
+        return state.getName().equals(PropertyState.OAK_CHILD_ORDER);
+    }
+
     private void checkType(PropertyState after) throws RepositoryException {
         boolean primaryType = JCR_PRIMARYTYPE.equals(after.getName());
         boolean mixinType = JCR_MIXINTYPES.equals(after.getName());



Mime
View raw message