You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2015/02/17 15:13:53 UTC

svn commit: r1660385 - /sling/trunk/tooling/ide/eclipse-ui/src/org/apache/sling/ide/eclipse/ui/nav/model/JcrNode.java

Author: rombert
Date: Tue Feb 17 14:13:53 2015
New Revision: 1660385

URL: http://svn.apache.org/r1660385
Log:
SLING-4332 - Malformed .content.xml files cause unhandled errors and
break the content navigator

Fix previous change - would cause a ConcurrentModificationException in
most cases

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=1660385&r1=1660384&r2=1660385&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 Tue Feb 17 14:13:53 2015
@@ -108,13 +108,13 @@ public class JcrNode implements IAdaptab
 	
 	final GenericJcrRootFile underlying;
 
-	JcrNode parent;
+    JcrNode parent;
 	
-	DirNode dirSibling;
+    DirNode dirSibling;
 
 	final List<JcrNode> children = new LinkedList<JcrNode>();
 
-	Element domElement;
+    Element domElement;
 
 	private IResource resource;
 	
@@ -351,13 +351,14 @@ public class JcrNode implements IAdaptab
 							GenericJcrRootFile gjrf;
                             try {
                                 gjrf = new GenericJcrRootFile(this, (IFile)iResource);
+                                it.remove();
                                 // gjrf.getChildren();
                                 gjrf.pickResources(membersList);
                             } catch (XMLParseException e) {
                                 // don't try to parse it
                                 // errors will be reported by the XML validation infrastructure
+                                it.remove();
                             }
-							it.remove();
 							
 							// as this might have added some new children, go through the children again and
 							// add them if they're not already added