Remove unnecessary synchronization
@@ -109,7 +109,6 @@ public class FileDBRegistry implements FileRegistry {
@Override
public synchronized FileReference addBlob(String blobName, ByteBuffer blob) {
String relativePath = blobToRelativeFile(blobName);
- synchronized (this) {
Optional<FileReference> cachedReference = Optional.ofNullable(fileReferenceCache.get(blobName));
return cachedReference.orElseGet(() -> {
FileReference newRef = manager.addBlob(blob, Path.fromString(relativePath));
@@ -117,7 +116,6 @@ public class FileDBRegistry implements FileRegistry {
return newRef;
});
}
- }
@Override
public synchronized List<Entry> export() {
