Deserializing Arrays on Android
<p>I'm currently working on a big app and I found a little Detail. It's possible to serialize Arrays and put them in a bundle. Then put it in a intent and start the activity. But on the receiving end I have to deserialize the array through a painful 2 step procedure.</p>

<pre><code>     MyObj[] data = (MyObj[])bundle.getSerializable("key"); // doesn't work

     Object[] temp = (Object[])bundle.getSerializable("key");
     MyObj[] data2 = (MyObj[])temp, // doesn't work

     MyObj[] data3 = new MyObj[temp.length]; // does work
     for(int i = 0; i &lt; temp.length; i++) {
          data3[i] = (MyObj)temp[i];
     }
</code></pre>

<p>What's the reason that I have to go through looping through the array?</p>
