处理 SonarQube 问题:
双重检查锁方式实现的单例,改为使用静态内部类方式
This commit is contained in:
@ -115,7 +115,7 @@ public class DetailDownloadUtils {
|
||||
}
|
||||
if (isCheck && viewHolder.gameEntity.getApk().size() == 1) {
|
||||
String url = viewHolder.gameEntity.getApk().get(0).getUrl();
|
||||
DownloadEntity downloadEntity = DownloadManager.getInstance(viewHolder.context).getDownloadEntityByUrl(url);
|
||||
DownloadEntity downloadEntity = DownloadManager.getInstance().getDownloadEntityByUrl(url);
|
||||
if (downloadEntity != null) {
|
||||
viewHolder.downloadEntity = downloadEntity;
|
||||
detailInvalidate(viewHolder);
|
||||
|
||||
Reference in New Issue
Block a user