1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-14 12:35:22 +02:00

[282634] [dstore] IndexOutOfBoundsException on Disconnect

This commit is contained in:
David McKnight 2009-07-13 13:35:15 +00:00
parent b20ea620b0
commit 1ad19aa557

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2008 IBM Corporation and others. * Copyright (c) 2002, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -26,6 +26,7 @@
* David McKnight (IBM) - [231639] [dstore] in single-process multi-client mode tracing shouldn't start until the client is set * David McKnight (IBM) - [231639] [dstore] in single-process multi-client mode tracing shouldn't start until the client is set
* Noriaki Takatsu (IBM) - [239073] [dstore] [multithread] In multithread, the cache jar should be assigned after the client is set * Noriaki Takatsu (IBM) - [239073] [dstore] [multithread] In multithread, the cache jar should be assigned after the client is set
* Noriaki Takatsu (IBM) - [245069] [dstore] dstoreTrace has no timestamp * Noriaki Takatsu (IBM) - [245069] [dstore] dstoreTrace has no timestamp
* David McKnight (IBM) - [282634] [dstore] IndexOutOfBoundsException on Disconnect
*******************************************************************************/ *******************************************************************************/
package org.eclipse.dstore.core.model; package org.eclipse.dstore.core.model;
@ -2154,9 +2155,11 @@ public final class DataStore
} }
// notify that preferences have changed // notify that preferences have changed
for (int i = 0; i < _dataStorePreferenceListeners.size(); i++){ synchronized (_dataStorePreferenceListeners){
IDataStorePreferenceListener listener = (IDataStorePreferenceListener)_dataStorePreferenceListeners.get(i); for (int i = 0; i < _dataStorePreferenceListeners.size(); i++){
listener.preferenceChanged(property, value); IDataStorePreferenceListener listener = (IDataStorePreferenceListener)_dataStorePreferenceListeners.get(i);
listener.preferenceChanged(property, value);
}
} }
} }
@ -2172,7 +2175,9 @@ public final class DataStore
* @since 3.0 * @since 3.0
*/ */
public void addDataStorePreferenceListener(IDataStorePreferenceListener listener){ public void addDataStorePreferenceListener(IDataStorePreferenceListener listener){
_dataStorePreferenceListeners.add(listener); synchronized (_dataStorePreferenceListeners){
_dataStorePreferenceListeners.add(listener);
}
} }
/** /**
@ -2182,7 +2187,9 @@ public final class DataStore
* @since 3.0 * @since 3.0
*/ */
public void removeDataStorePreferenceListener(IDataStorePreferenceListener listener){ public void removeDataStorePreferenceListener(IDataStorePreferenceListener listener){
_dataStorePreferenceListeners.remove(listener); synchronized (_dataStorePreferenceListeners){
_dataStorePreferenceListeners.remove(listener);
}
} }
/** /**
@ -2190,7 +2197,9 @@ public final class DataStore
* @since 3.0 * @since 3.0
*/ */
public void removeAllDataStorePreferenceListeners(){ public void removeAllDataStorePreferenceListeners(){
_dataStorePreferenceListeners.clear(); synchronized (_dataStorePreferenceListeners){
_dataStorePreferenceListeners.clear();
}
} }
/** /**