diff options
author | Brad Fitzpatrick <bradfitz@android.com> | 2011-03-15 11:00:51 -0700 |
---|---|---|
committer | Android Code Review <code-review@android.com> | 2011-03-15 11:00:51 -0700 |
commit | 40b207c131e224554e30cde30fe4ee49817432ee (patch) | |
tree | 0a6eb70fc575a0f8040e8e95b3f40125a9d8fe37 | |
parent | b37f7e59ee38472bdd3ca5fe66cc847890c862e2 (diff) | |
parent | 594b47d5928699fe5a1d052030c31902964d6cd0 (diff) | |
download | frameworks_base-40b207c131e224554e30cde30fe4ee49817432ee.zip frameworks_base-40b207c131e224554e30cde30fe4ee49817432ee.tar.gz frameworks_base-40b207c131e224554e30cde30fe4ee49817432ee.tar.bz2 |
Merge "Using proper key for removing object from the map."
-rw-r--r-- | core/java/android/net/http/CertificateValidatorCache.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/net/http/CertificateValidatorCache.java b/core/java/android/net/http/CertificateValidatorCache.java index 47661d5..a89f75c 100644 --- a/core/java/android/net/http/CertificateValidatorCache.java +++ b/core/java/android/net/http/CertificateValidatorCache.java @@ -137,8 +137,8 @@ class CertificateValidatorCache { if (domain != null && domain.length() != 0) { if (secureHash != null && secureHash.length != 0) { - CacheEntry cacheEntry = (CacheEntry)mCacheMap.get( - new Integer(mBigScrew ^ domain.hashCode())); + final Integer key = new Integer(mBigScrew ^ domain.hashCode()); + CacheEntry cacheEntry = mCacheMap.get(key); if (cacheEntry != null) { if (!cacheEntry.expired()) { rval = cacheEntry.has(domain, secureHash); @@ -148,7 +148,7 @@ class CertificateValidatorCache { } // TODO: debug only! } else { - mCacheMap.remove(cacheEntry); + mCacheMap.remove(key); } } } |