* Make checkForUpdates() synchronized, as concurrent threads can cause a

ConcurrentModificationException in the iterator.
This commit is contained in:
hns 2005-12-12 15:54:07 +00:00
parent bc44143b14
commit 103f0f446f

View file

@ -125,7 +125,7 @@ public final class Prototype {
* called the code and skins collections of this prototype should be * called the code and skins collections of this prototype should be
* up-to-date and the lastCodeUpdate be set if there has been any changes. * up-to-date and the lastCodeUpdate be set if there has been any changes.
*/ */
public void checkForUpdates() { public synchronized void checkForUpdates() {
boolean updatedResources = false; boolean updatedResources = false;
// check if any resource the prototype knows about has changed or gone // check if any resource the prototype knows about has changed or gone