diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-14 15:32:42 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-14 15:32:42 -0700 |
commit | 1c9a92fd9fbe192f24e53c26cddeab401cefb108 (patch) | |
tree | 6a33161489aa80bb09dfaea6da77fed709ab7edd /core | |
parent | 9ea923174c2daffd9b6a1cd630018d3fdfe91f62 (diff) | |
parent | 3537506c883cdf4f4b792590abb5a8acb937503a (diff) | |
download | frameworks_base-1c9a92fd9fbe192f24e53c26cddeab401cefb108.zip frameworks_base-1c9a92fd9fbe192f24e53c26cddeab401cefb108.tar.gz frameworks_base-1c9a92fd9fbe192f24e53c26cddeab401cefb108.tar.bz2 |
Merge change 1690 into donut
* changes:
Rework some code so that it works the way it was supposed to work.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/net/http/CertificateValidatorCache.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/net/http/CertificateValidatorCache.java b/core/java/android/net/http/CertificateValidatorCache.java index 54a1dbe..47661d5 100644 --- a/core/java/android/net/http/CertificateValidatorCache.java +++ b/core/java/android/net/http/CertificateValidatorCache.java @@ -236,15 +236,17 @@ class CertificateValidatorCache { } } - int hashLength = secureHash.length; - if (secureHash != null && 0 < hashLength) { - if (hashLength == mHash.length) { - for (int i = 0; i < hashLength; ++i) { - if (secureHash[i] != mHash[i]) { - return false; + if (secureHash != null) { + int hashLength = secureHash.length; + if (0 < hashLength) { + if (hashLength == mHash.length) { + for (int i = 0; i < hashLength; ++i) { + if (secureHash[i] != mHash[i]) { + return false; + } } + return true; } - return true; } } |