title: When using an android bundle, why does a serialised stack deserialise as an ArrayList?
body: <p>Serialisation:</p>
  <pre><code>Bundle activityArguments = new Bundle();
  Stack&lt;Class&lt;? extends WizardStep&gt;&gt; wizardSteps = new Stack&lt;Class&lt;? extends WizardStep&gt;&gt;();
  wizardSteps.push(CreateAlarmStep5View.class);
  wizardSteps.push(CreateAlarmStep4View.class);
  wizardSteps.push(CreateAlarmStep3View.class);
  wizardSteps.push(CreateAlarmStep2View.class);
  wizardSteps.push(CreateAlarmStep1View.class);
          
  activityArguments.putSerializable(&quot;WizardSteps&quot;, wizardSteps);
  </code></pre>
  <p>Deserialisation:</p>
  <pre><code>Stack&lt;Class&lt;? extends WizardStep&gt;&gt; wizardSteps = 
  (Stack&lt;Class&lt;? extends WizardStep&gt;&gt;) getIntent().getExtras().getSerializable(&quot;WizardSteps&quot;);
  </code></pre>
  <p>Exception:</p>
  <blockquote>
  <p>12-20 23:19:45.698: E/AndroidRuntime(12145): Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Stack</p>
  </blockquote>