Rework some code so that it works the way it was supposed to work.
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 @@
                 }
             }
 
-            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;
                 }
             }