Eliminate unlikely transient blobstore TOCTOU bug

This commit is contained in:
Andrew Gaul 2012-06-19 15:20:13 -07:00
parent 5ad8d2c1f7
commit 932b738026
1 changed files with 3 additions and 2 deletions

View File

@ -79,8 +79,9 @@ public class TransientStorageStrategy {
}
public void removeBlob(final String containerName, final String blobName) {
if (containerToBlobs.containsKey(containerName))
containerToBlobs.get(containerName).remove(blobName);
Map<String, Blob> map = containerToBlobs.get(containerName);
if (map != null)
map.remove(blobName);
}
public Iterable<String> getBlobKeysInsideContainer(final String containerName) {