title: Collections.sort is not sorting anything
body: <p>I'm trying to sort a String array in a short, simple way.
  I'm trying to use Collections.sort, but I don't understand why it doesn't sort anything.
  Code:</p>
  
  <pre><code>public static String[] FishNamesSorted;
  .....
  List&lt;String&gt; nameslist = new ArrayList&lt;String&gt;();
  nameslist.toArray(FishNamesSorted);
  Collections.sort(nameslist, String.CASE_INSENSITIVE_ORDER); &lt;--- NOT WORKING
  
  Collections.sort(nameslist, new Comparator&lt;String&gt;() { &lt;--- NOT WORKING
      @Override
      public int compare(String p1, String p2) {
      if (p1 == null) {
          return 1;
      }
      if (p2 == null) {
          return -1;
      }
      return p1.compareToIgnoreCase(p2);
      }
  });
  </code></pre>
  
  <p>Results in both cases:</p>
  
  <ul>
  <li>Poecilia Latipinna  </li>
  <li>Poecilia Reticulata   </li>
  <li>Notropis Chrosomus     </li>
  <li>Pseudomugil Gertrudae  </li>
  <li>....</li>
  </ul>
  
  <p>Whyyyy?</p>