diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-14 15:40:01 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-05-14 15:40:01 -0700 |
commit | 67fd6d50af256265c8103d844212934f86079815 (patch) | |
tree | ef9662385ac855454272dccc4527a92ecb9e7848 /core/java/android/net | |
parent | 80a538d656c7392ac8d8dc1be711bd0f5a2e9316 (diff) | |
parent | 1c9a92fd9fbe192f24e53c26cddeab401cefb108 (diff) | |
download | frameworks_base-67fd6d50af256265c8103d844212934f86079815.zip frameworks_base-67fd6d50af256265c8103d844212934f86079815.tar.gz frameworks_base-67fd6d50af256265c8103d844212934f86079815.tar.bz2 |
am 1c9a92fd: Merge change 1690 into donut
Merge commit '1c9a92fd9fbe192f24e53c26cddeab401cefb108'
* commit '1c9a92fd9fbe192f24e53c26cddeab401cefb108':
Rework some code so that it works the way it was supposed to work.
Diffstat (limited to 'core/java/android/net')
-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; } } |