[300267] Deleting obsolete code - VirtualComponent.cleanUpReferences
diff --git a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
index 6a45b5d..f3c56c0 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
+++ b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
@@ -29,6 +29,7 @@
 <p>Bug <a href='https://bugs.eclipse.org/293586'>293586</a>. org.eclipse.wst.common.component file incorrectly marked as need to be written</p>
 <p>Bug <a href='https://bugs.eclipse.org/299057'>299057</a>. ValidateEdit called when ArtifactEdit model not dirty</p>
 <p>Bug <a href='https://bugs.eclipse.org/300062'>300062</a>. Performance improvement of VirtualComponent caching</p>
+<p>Bug <a href='https://bugs.eclipse.org/300267'>300267</a>. Deleting obsolete code - VirtualComponent.cleanUpReferences</p>
 
 </body>
 </html>
\ No newline at end of file
diff --git a/features/org.eclipse.wst.common_core.feature.patch/feature.properties b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
index e3ca71c..4d5caea 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/feature.properties
+++ b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
@@ -43,6 +43,7 @@
 Bug https://bugs.eclipse.org/293586 org.eclipse.wst.common.component file incorrectly marked as need to be written\n\
 Bug https://bugs.eclipse.org/299057 ValidateEdit called when ArtifactEdit model not dirty\n\
 Bug https://bugs.eclipse.org/300062 Performance improvement of VirtualComponent caching\n\
+Bug https://bugs.eclipse.org/300267 Deleting obsolete code - VirtualComponent.cleanUpReferences\n\
 \n\
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
index 265688a..7402d0b 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
@@ -425,10 +425,6 @@
 					component.getReferencedComponents().add(referencedComponent);
 				referencedComponent.setArchiveName(references[i].getArchiveName());
 			}
-			//clean up any old obsolete references
-			if (component != null){
-				cleanUpReferences(component);
-			}
 		} finally {
 			if(core != null) {
 				core.saveIfNecessary(null);
@@ -436,21 +432,7 @@
 			}
 		}	
 	}
-	
-	private void cleanUpReferences(WorkbenchComponent component) {
-		List referencedComponents = component.getReferencedComponents();
-		clearCache();
-		for (Iterator iter = referencedComponents.iterator(); iter.hasNext();) {
-			ReferencedComponent referencedComponent = (ReferencedComponent) iter.next();
-			if (referencedComponent==null) 
-				continue;
-			IVirtualReference vReference = StructureEdit.createVirtualReference(this, referencedComponent);
-			if (vReference == null || vReference.getReferencedComponent() == null || !vReference.getReferencedComponent().exists()){
-				iter.remove();
-			}
-		}
-	}
-	
+
 	public void setReferences(IVirtualReference[] references) { 
 		StructureEdit core = null;
 		try {