Fixed java.lang.ClassCastException entered in the previous update

This commit is contained in:
David A. Velasco 2012-09-05 16:02:42 +02:00
parent 48f13c8adc
commit 301b2760ba
2 changed files with 4 additions and 4 deletions

View file

@ -42,9 +42,10 @@ public class SslAnalyzer {
*/
public static Exception getRecoverableException(RemoteOperationResult result) {
Exception ret = null;
SSLException e = (SSLException)result.getException();
SSLException e = null;
Throwable cause = null;
if (e != null) {
if (result.getException() instanceof SSLException) {
e = (SSLException)result.getException();
if (e instanceof SSLPeerUnverifiedException) {
ret = e;

View file

@ -69,8 +69,7 @@ public class SslValidatorDialog extends Dialog {
* by setting the certificate as reliable.
*/
public static SslValidatorDialog newInstance(Context context, RemoteOperationResult result, OnSslValidatorListener listener) {
Exception e = SslAnalyzer.getRecoverableException(result);
if (e != null) {
if (SslAnalyzer.isRecoverable(result)) {
SslValidatorDialog dialog = new SslValidatorDialog(context, listener);
return dialog;
} else {