Create a base class for DASH downloading related tests

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158129802
This commit is contained in:
eguven 2017-06-06 05:31:42 -07:00 committed by Oliver Woodman
parent edbc2046e2
commit 5c2c3c5c63

View File

@ -110,7 +110,8 @@ public final class SimpleCache implements Cache {
@Override
public synchronized NavigableSet<CacheSpan> getCachedSpans(String key) {
CachedContent cachedContent = index.get(key);
return cachedContent == null ? null : new TreeSet<CacheSpan>(cachedContent.getSpans());
return cachedContent == null || cachedContent.isEmpty() ? null
: new TreeSet<CacheSpan>(cachedContent.getSpans());
}
@Override