Index: src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidator.java =================================================================== --- src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidator.java (revision 1455873) +++ src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidator.java (working copy) @@ -117,6 +117,9 @@ @Override public Validator childNodeAdded(String name, NodeState after) throws CommitFailedException { + if (NodeStateUtils.isHidden(name)) { + return null; + } try { getParentType().checkAddChildNode(name, getNodeType(after)); @@ -133,11 +136,17 @@ @Override public Validator childNodeChanged(String name, NodeState before, NodeState after) throws CommitFailedException { + if (NodeStateUtils.isHidden(name)) { + return null; + } return new TypeValidator(ntm, new ReadOnlyTree(parent, name, after), mapper); } @Override public Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException { + if (NodeStateUtils.isHidden(name)) { + return null; + } try { getParentType().checkRemoveNode(name, getNodeType(before)); return null; Index: src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidatorTest.java =================================================================== --- src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidatorTest.java (revision 0) +++ src/test/java/org/apache/jackrabbit/oak/plugins/nodetype/TypeValidatorTest.java (revision 0) @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jackrabbit.oak.plugins.nodetype; + +import org.apache.jackrabbit.oak.Oak; +import org.apache.jackrabbit.oak.api.CommitFailedException; +import org.apache.jackrabbit.oak.api.ContentSession; +import org.apache.jackrabbit.oak.api.Root; +import org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent; +import org.junit.Test; + +/** + * Test for OAK-695. + */ +public class TypeValidatorTest { + + @Test + public void ignoreHidden() throws CommitFailedException { + Oak oak = new Oak() + .with(new InitialContent()) + .with(new TypeValidatorProvider()); + ContentSession session = oak.createContentSession(); + Root root = session.getLatestRoot(); + root.getTree("/").addChild(":hidden"); + root.commit(); + root.getTree("/:hidden").setProperty("prop", "value"); + root.commit(); + root.getTree("/:hidden").remove(); + root.commit(); + } +} Property changes on: src\test\java\org\apache\jackrabbit\oak\plugins\nodetype\TypeValidatorTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Rev URL Added: svn:eol-style + native