am 40b207c1: Merge "Using proper key for removing object from the map."

* commit '40b207c131e224554e30cde30fe4ee49817432ee':
  Using proper key for removing object from the map.
This commit is contained in:
Brad Fitzpatrick
2011-03-15 11:30:04 -07:00
committed by Android Git Automerger

View File

@@ -137,8 +137,8 @@ class CertificateValidatorCache {
if (domain != null && domain.length() != 0) { if (domain != null && domain.length() != 0) {
if (secureHash != null && secureHash.length != 0) { if (secureHash != null && secureHash.length != 0) {
CacheEntry cacheEntry = (CacheEntry)mCacheMap.get( final Integer key = new Integer(mBigScrew ^ domain.hashCode());
new Integer(mBigScrew ^ domain.hashCode())); CacheEntry cacheEntry = mCacheMap.get(key);
if (cacheEntry != null) { if (cacheEntry != null) {
if (!cacheEntry.expired()) { if (!cacheEntry.expired()) {
rval = cacheEntry.has(domain, secureHash); rval = cacheEntry.has(domain, secureHash);
@@ -148,7 +148,7 @@ class CertificateValidatorCache {
} }
// TODO: debug only! // TODO: debug only!
} else { } else {
mCacheMap.remove(cacheEntry); mCacheMap.remove(key);
} }
} }
} }