mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Add missing synchronized keywords and assertions
applyContentMetadataMutations and getContentMetadata methods suppossed to be synchronized and assert the instance isn't released. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191419637
This commit is contained in:
parent
82c71378eb
commit
f7e2cdbbbb
1 changed files with 5 additions and 3 deletions
|
|
@ -306,14 +306,16 @@ public final class SimpleCache implements Cache {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void applyContentMetadataMutations(String key, ContentMetadataMutations mutations)
|
||||
throws CacheException {
|
||||
public synchronized void applyContentMetadataMutations(
|
||||
String key, ContentMetadataMutations mutations) throws CacheException {
|
||||
Assertions.checkState(!released);
|
||||
index.applyContentMetadataMutations(key, mutations);
|
||||
index.store();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContentMetadata getContentMetadata(String key) {
|
||||
public synchronized ContentMetadata getContentMetadata(String key) {
|
||||
Assertions.checkState(!released);
|
||||
return index.getContentMetadata(key);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue