--- a/cdt/cdt_6_0_x/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java Thu Jan 28 17:33:54 2010 -0600
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java Wed Feb 10 13:34:53 2010 -0600
@@ -231,14 +231,16 @@
public boolean handlesEvent(int eventType){
return (eventType & fEventTypes) != 0;
}
- @Override
- public int hashCode() {
- return fListener.hashCode();
- }
- @Override
- public boolean equals(Object obj) {
- return fListener.equals(obj);
- }
+
+ // Can't use these due to implementation of CopyOnWriteArraySet.remove()
+// @Override
+// public int hashCode() {
+// return fListener.hashCode();
+// }
+// @Override
+// public boolean equals(Object obj) {
+// return fListener.equals(obj);
+// }
}
private volatile Map<String, CConfigurationDataProviderDescriptor> fProviderMap;
@@ -2088,7 +2090,14 @@
}
public void removeCProjectDescriptionListener(ICProjectDescriptionListener listener) {
- fListeners.remove(listener);
+// fListeners.remove(listener);
+// Note: can't use remove directly due to the implementation of CopyOnWriteArraySet.remove()
+ for (ListenerDescriptor listenerDescriptor : fListeners) {
+ if (listenerDescriptor.fListener.equals(listener)) {
+ fListeners.remove(listenerDescriptor);
+ break;
+ }
+ }
}
public void notifyListeners(CProjectDescriptionEvent event){