title: Unchecked cast: 'java.io.Serializable' to 'java.util.ArrayList<android.app.Fragment>'
body: <p>I am getting an unchecked cast warning and I am not sure if it is safe to suppress it.</p>
  
  <p>I am putting an <code>ArrayList&lt;Fragment&gt;</code> inside a <code>Bundle</code>. This Bundle is then put in my Intent as following:</p>
  
  <pre><code>Intent mIntent = new Intent(getBaseContext(),MySecondActivity.class);
  Bundle myBundle = new Bundle();
  myBundle.putSerializable("fragmentList",ArrayList&lt;Fragment&gt;);
  mIntent.putExtras(myBundle);
  startActivity(mIntent);
  </code></pre>
  
  <p>Then on my new activity (MySecondActivity) I am retrieving this data with the following code:</p>
  
  <pre><code>(ArrayList&lt;Fragment&gt;) getIntent().getSerializableExtra("fragmentList")
  </code></pre>
  
  <p>My compiler gives me the following warning:</p>
  
  <blockquote>
    <p>" Unchecked cast: 'java.io.Serializable' to
    'java.util.ArrayList' "</p>
  </blockquote>
  
  <p>Everything is working fine though, am I right to say I can safely suppress it?</p>
  
  <p>Thank you!</p>