title: ConcurrentModificationException only in Java 1.8.0_45
body: <p>I've got two question about this code:</p>
  
  <pre><code>import java.util.*;
  
  public class TestClass {
  
      private static List&lt;String&gt; list;   
      public static void main(String[] argv) {
  
          list = generateStringList(new Random(), "qwertyuioasdfghjklzxcvbnmPOIUYTREWQLKJHGFDSAMNBVCXZ1232456789", 50, 1000);
  
  //      Collections.sort(list, new Comparator&lt;String&gt;() {
  //          public int compare(String f1, String f2) {
  //              return -f1.compareTo(f2);
  //          }
  //      });
  
          for (int i = 0; i &lt; 500; i++) {
              new MyThread(i).start();
           }
  
      }
  
      private static class MyThread extends Thread  {
          int id;
          MyThread(int id) { this.id = id; }
          public void run() {
  
              Collections.sort(list, new Comparator&lt;String&gt;() {
                  public int compare(String f1, String f2) {
                      return -f1.compareTo(f2);
                  }
              });
  
              for (Iterator it = list.iterator(); it.hasNext();) {
                  String s = (String) it.next();
                  try {
                      Thread.sleep(10 + (int)(Math.random()*100));
                  }catch (Exception e) { e.printStackTrace(); }
  
                  System.out.println(id+" -&gt; "+s);
              }           
          }       
      }
  
      public static List&lt;String&gt; generateStringList(Random rng, String characters, int length, int size)
      {
          List&lt;String&gt; list = new ArrayList&lt;String&gt;();
          for (int j = 0; j &lt; size; j++) {
              char[] text = new char[length];
              for (int i = 0; i &lt; length; i++)
              {
                  text[i] = characters.charAt(rng.nextInt(characters.length()));
              }
              list.add(new String(text));
          }
          return list;
      }
  }
  </code></pre>
  
  <p>Running this code on java 1.8.0_45 i got <code>java.util.ConcurrentModificationException</code>.</p>
  
  <p>1) Why I got the exception also if I decomment the sort before the thread.start?</p>
  
  <p>2) Why I only got the exception on java 1.8.0_45? On 1.6.0_45, 1.7.0_79, 1.8.0_5 it works fine.</p>