Commit f21cdcb9 by eguven Committed by Oliver Woodman

Allow null DataSink.Factory in CacheDataSourceFactory

CacheDataSource allows null DataSink. Do the same in CacheDataSourceFactory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149750696
parent cb018795
......@@ -68,7 +68,8 @@ public final class CacheDataSourceFactory implements DataSource.Factory {
public CacheDataSource createDataSource() {
return new CacheDataSource(cache, upstreamFactory.createDataSource(),
cacheReadDataSourceFactory.createDataSource(),
cacheWriteDataSinkFactory.createDataSink(), flags, eventListener);
cacheWriteDataSinkFactory != null ? cacheWriteDataSinkFactory.createDataSink() : null,
flags, eventListener);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment