ShadowHttpResponseCache.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:FullRobolectricTestSample 作者:
@Implementation
public static HttpResponseCache install(File directory, long maxSize) {
  HttpResponseCache cache = newInstanceOf(HttpResponseCache.class);
  ShadowHttpResponseCache shadowCache = Robolectric.shadowOf(cache);
  shadowCache.originalObject = cache;
  shadowCache.directory = directory;
  shadowCache.maxSize = maxSize;
  synchronized (LOCK) {
    installed = shadowCache;
    return cache;
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号