File tree 2 files changed +6
-6
lines changed
utilcode/src/main/java/com/blankj/utilcode/util
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public class CacheUtils {
52
52
public static final int HOUR = 3600 ;
53
53
public static final int DAY = 86400 ;
54
54
55
- private static Map <String , CacheUtils > sCacheMap = new HashMap <>();
55
+ private static final Map <String , CacheUtils > CACHE_MAP = new HashMap <>();
56
56
private CacheManager mCacheManager ;
57
57
58
58
/**
@@ -131,10 +131,10 @@ public static CacheUtils getInstance(@NonNull final File cacheDir) {
131
131
*/
132
132
public static CacheUtils getInstance (@ NonNull final File cacheDir , final long maxSize , final int maxCount ) {
133
133
final String cacheKey = cacheDir .getAbsoluteFile () + "_" + Process .myPid ();
134
- CacheUtils cache = sCacheMap .get (cacheKey );
134
+ CacheUtils cache = CACHE_MAP .get (cacheKey );
135
135
if (cache == null ) {
136
136
cache = new CacheUtils (cacheDir , maxSize , maxCount );
137
- sCacheMap .put (cacheKey , cache );
137
+ CACHE_MAP .put (cacheKey , cache );
138
138
}
139
139
return cache ;
140
140
}
Original file line number Diff line number Diff line change 19
19
*/
20
20
public final class SPUtils {
21
21
22
- private static Map <String , SPUtils > sSPMap = new HashMap <>();
22
+ private static final Map <String , SPUtils > SP_MAP = new HashMap <>();
23
23
private SharedPreferences sp ;
24
24
25
25
/**
@@ -39,10 +39,10 @@ public static SPUtils getInstance() {
39
39
*/
40
40
public static SPUtils getInstance (String spName ) {
41
41
if (isSpace (spName )) spName = "spUtils" ;
42
- SPUtils sp = sSPMap .get (spName );
42
+ SPUtils sp = SP_MAP .get (spName );
43
43
if (sp == null ) {
44
44
sp = new SPUtils (spName );
45
- sSPMap .put (spName , sp );
45
+ SP_MAP .put (spName , sp );
46
46
}
47
47
return sp ;
48
48
}
You can’t perform that action at this time.
0 commit comments