summaryrefslogtreecommitdiffstats
path: root/core/java/android/net
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-14 15:40:01 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-14 15:40:01 -0700
commit67fd6d50af256265c8103d844212934f86079815 (patch)
treeef9662385ac855454272dccc4527a92ecb9e7848 /core/java/android/net
parent80a538d656c7392ac8d8dc1be711bd0f5a2e9316 (diff)
parent1c9a92fd9fbe192f24e53c26cddeab401cefb108 (diff)
downloadframeworks_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.java16
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;
}
}