summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2011-03-15 11:00:51 -0700
committerAndroid Code Review <code-review@android.com>2011-03-15 11:00:51 -0700
commit40b207c131e224554e30cde30fe4ee49817432ee (patch)
tree0a6eb70fc575a0f8040e8e95b3f40125a9d8fe37
parentb37f7e59ee38472bdd3ca5fe66cc847890c862e2 (diff)
parent594b47d5928699fe5a1d052030c31902964d6cd0 (diff)
downloadframeworks_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.java6
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);
}
}
}