Bug 134364 - [Backport] Test failure: Malformed tree
diff --git a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF index 43569aa..965200c 100644 --- a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.core.resources; singleton:=true -Bundle-Version: 3.2.2.qualifier +Bundle-Version: 3.2.3.qualifier Bundle-Activator: org.eclipse.core.internal.compatibility.PluginActivator Bundle-Vendor: %providerName
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTree.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTree.java index 1a6a223..8692b74 100644 --- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTree.java +++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTree.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -147,7 +147,7 @@ * and will be immutable afterwards. * @return this tree. */ - public ElementTree collapseTo(ElementTree parent) { + public synchronized ElementTree collapseTo(ElementTree parent) { Assert.isTrue(tree.isImmutable()); if (this == parent) { //already collapsed @@ -311,7 +311,7 @@ * specified by the given path. * The given element must be present in this tree. */ - public int getChildCount(IPath key) { + public synchronized int getChildCount(IPath key) { Assert.isNotNull(key); return getChildIDs(key).length; } @@ -342,7 +342,7 @@ * specified by the given path. * The given element must be present in this tree. */ - public IPath[] getChildren(IPath key) { + public synchronized IPath[] getChildren(IPath key) { Assert.isNotNull(key); return getChildIDs(key); } @@ -393,7 +393,7 @@ * The specified element must exist in the tree. * If the specified element is null, returns the root element path. */ - public String[] getNamesOfChildren(IPath key) { + public synchronized String[] getNamesOfChildren(IPath key) { try { if (key == null) return new String[] {""}; //$NON-NLS-1$