Kiedy korzystasz z paczki z Androidem, dlaczego serializowany stos deserialise jako ArrayList?

Serializacja:

Bundle activityArguments = new Bundle();
Stack<Class<? extends WizardStep>> wizardSteps = new Stack<Class<? extends WizardStep>>();
        wizardSteps.push(CreateAlarmStep5View.class);
        wizardSteps.push(CreateAlarmStep4View.class);
        wizardSteps.push(CreateAlarmStep3View.class);
        wizardSteps.push(CreateAlarmStep2View.class);
        wizardSteps.push(CreateAlarmStep1View.class);

        activityArguments.putSerializable("WizardSteps", wizardSteps);

Deserializacja:

Stack<Class<? extends WizardStep>> wizardSteps = 
(Stack<Class<? extends WizardStep>>) getIntent().getExtras().getSerializable("WizardSteps");

Wyjątek:

12-20 23: 19: 45.698: E / AndroidRuntime (12145): Przyczyna: java.lang.ClassCastException: java.util.ArrayList nie może być rzutowany na java.util.Stack

questionAnswers(3)

yourAnswerToTheQuestion