Project

General

Profile

Bug #384

NullPointerException dans MemorizingTrustManager

Added by Romain Vimont over 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
01/07/2012
Due date:
% Done:

100%

Estimated time:
Affected version:
0.1.6
Locale:
Close

Description

En me connectant sur un serveur qui me présentait un certificat autosigné, quand je l'ai accepté, j'ai eu un NullPointerException ligne 384 de MemorizingTrustManager, dans ce bout de code :

    public static void interactResult(Intent i) {
        int decisionId = i.getIntExtra(DECISION_INTENT_ID, MTMDecision.DECISION_INVALID);
        int choice = i.getIntExtra(DECISION_INTENT_CHOICE, MTMDecision.DECISION_INVALID);
        Log.d(TAG, "interactResult: " + decisionId + " chose " + choice);
        Log.d(TAG, "openDecisions: " + openDecisions);

        MTMDecision d;
        synchronized(openDecisions) {
             d = openDecisions.get(decisionId);
             openDecisions.remove(decisionId);
        }
        synchronized(d) {             // <--- ligne 384 : d is Null
            d.state = choice;
            d.notify();
        }
    }

Je ne sais pas trop la cause (est-ce qu'un simple test d != null suffirait, où alors cela traduit-il un problème plus important, où d ne devrait jamais être null ?).


Related issues

Related to Feature #408: Update MITM library to the latest versionClosedFrédéric Barthéléry01/31/2012

Actions

Also available in: Atom PDF