From 6ba0c4e8ba15a6ca8b5f600ef876d847d3d989b7 Mon Sep 17 00:00:00 2001 From: David McKnight Date: Wed, 1 Feb 2012 16:29:48 +0000 Subject: [PATCH] [368454] provide thread safety for cachedRemoteFiles hashmap --- .../files/core/subsystems/RemoteFileSubSystem.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java index c1c6f566b7b..6017406aea1 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java +++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2011 IBM Corporation and others. + * Copyright (c) 2002, 2012 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 @@ -123,7 +123,11 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi protected ArrayList _searchHistory; - // all created IRemoteFiles mapped in cache to quick retrieval + /** + * All created IRemoteFiles are mapped in a cache for quick retrieval. + * This is a HashMap so any access to it needs to be synchronized otherwise + * thread-safety could be compromised. + */ protected HashMap _cachedRemoteFiles = new HashMap(); /**