title: File cannot be converted to apparently, file
body: <p>After I converted an ArrayList to an Object[]. I then tried to convert that to an File[] which throws a ClassCastException. When I ran it through the Eclipse debugger, I see that the Object[] contains two File objects.</p>
  
  <pre><code>List&lt;File&gt; list = new ArrayList&lt;File&gt;();
  list.add(new File("foo.bar")); list.add(new File("foo.bar.bar"));
  Object[] objlist = list.toArray();
  File[] flist = (File[]) objlist;
  </code></pre>
  
  <p>Running this throws the following exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.io.File;
  at sphinx.file.ResourceGetter.getResources(ResourceGetter.java:37)
  at sphinx.test.Test.main(Test.java:13)
  </code></pre>
  
  <p>Eclipse tells me this:</p>
  
  <pre><code>Name: objlist.[0] Value: java.io.File
  Value: objlist.[1] Value: java.io.File
  </code></pre>
  
  <p>I do not understand why this is happening.</p>