title: java.lang.IllegalArgumentException: Comparison method violates its general contract! java.util.Date
body: <pre><code>java.lang.IllegalArgumentException: Comparison method violates its general contract!
      at java.util.TimSort.mergeLo(TimSort.java:747)
      at java.util.TimSort.mergeAt(TimSort.java:483)
      at java.util.TimSort.mergeCollapse(TimSort.java:410)
      at java.util.TimSort.sort(TimSort.java:214)
      at java.util.TimSort.sort(TimSort.java:173)
      at java.util.Arrays.sort(Arrays.java:659)
      at java.util.Collections.sort(Collections.java:217)
  </code></pre>
  
  <p>I am sorting a collection based on the following comparator.</p>
  
  <pre><code>public static Comparator&lt;MyClass&gt; CMP_TIME_DESC = new Comparator&lt;MyClass&gt;() {
      @Override
      public int compare(MyClass o1, MyClass o2) {
          return o2.getOrderSendTime().compareTo(o1.getOrderSendTime());
      }
  };
  </code></pre>
  
  <p>The values are always non-null.
  And the getOrderSendTime() object is of the java.util.Date class.</p>
  
  <p>I understand that this is a transitivity inconsistency, and I would assume a class like this would not have such issues. I searched for open issues, but did not find any on the topic.</p>
  
  <p>Any ideas?</p>