Skip to content

Commit 7113028

Browse files
committed
Fix thread safety issues in LocalRawGcsService and MemoryBlobStorage.
PiperOrigin-RevId: 899182135 Change-Id: If52fbcc88bf10b029f33eb5f4e2fcd814114c53d
1 parent bf1d116 commit 7113028

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api_dev/src/main/java/com/google/appengine/api/blobstore/dev/MemoryBlobStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import java.io.IOException;
2424
import java.io.InputStream;
2525
import java.io.OutputStream;
26-
import java.util.HashMap;
2726
import java.util.Map;
27+
import java.util.concurrent.ConcurrentHashMap;
2828

2929
/**
3030
* A version of {@link BlobStorage} that stores all data in memory.
@@ -35,7 +35,7 @@ class MemoryBlobStorage implements BlobStorage {
3535
private final BlobInfoStorage blobInfoStorage;
3636

3737
MemoryBlobStorage(BlobInfoStorage blobInfoStorage) {
38-
this.blobContents = new HashMap<BlobKey, byte[]>();
38+
this.blobContents = new ConcurrentHashMap<>();
3939
this.blobInfoStorage = blobInfoStorage;
4040
}
4141

0 commit comments

Comments
 (0)