title: Serialization issue with SortedSet, Arrays, an Serializable
body: <p>I have this before the process:</p>
  
  <pre><code>protected void onPostExecute(SortedSet&lt;RatedMessage&gt; result) {
      List&lt;Object&gt; list=Arrays.asList(result.toArray());
      lancon.putExtra("results", list.toArray()); // as serializable
  }
  </code></pre>
  
  <p>then in the other part I have</p>
  
  <pre><code>Object o=this.getIntent().getSerializableExtra("results");
  //at this point the o holds the correct value (checked by debugger)
  RatedMessage[] rm = (RatedMessage[]) o;// this line hangs out w ClassCastException
  resultSet = new TreeSet&lt;RatedMessage&gt;(new Comp());
  Collections.addAll(resultSet, rm);
  </code></pre>
  
  <p>Why I get the ClassCastException?</p>