You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2014/06/04 10:37:54 UTC
svn commit: r1600001 -
/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
Author: stefanegli
Date: Wed Jun 4 08:37:53 2014
New Revision: 1600001
URL: http://svn.apache.org/r1600001
Log:
SLING-2985 : disallow creation of child nodes for nt:file-s
Modified:
sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
Modified: sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java?rev=1600001&r1=1600000&r2=1600001&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java (original)
+++ sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java Wed Jun 4 08:37:53 2014
@@ -786,6 +786,8 @@ public class JcrNode implements IAdaptab
if (parentSk==SerializationKind.METADATA_FULL) {
createDomChild(childNodeName, childNodeType);
+ } else if (parentSk==SerializationKind.FILE) {
+ throw new IllegalStateException("cannot create child of nt:file");
} else if (childSk==SerializationKind.FOLDER) {
IFolder f = (IFolder)resource;
IFolder newFolder = null;