title: Java TimSort throws IllegalArgumentException: Comparison method violates its general contract
body: <p>This does not seem to be the same as any of the other Java sort exception issues already brought up.  Using Java SE 8.  My comparator:</p>
  
  <pre><code>@Override
  public int compare (BusinessObject bo1, BusinessObject bo2) {
    int scoreComp = Double.compare(bo1.getScore(), bo2.getScore());
    if (scoreComp != 0) {
      return(scoreComp);
    }
    String name1 = bo1.getName() == null ? "" : bo1.getName();
    String name2 = bo2.getName() == null ? "" : bo2.getName();
    return(name1.compareTo(name2));
  }
  </code></pre>
  
  <p>When I run this on lists of 10,000 or so objects, it throws the IllegalArgumentException about 25% of the time.  If I rerun it on the same data, it sometimes does not throw the exception.  I don't see any transitivity issues or NaN issues.  Any thoughts?</p>