java.lang.IllegalArgumentException: Comparison method violates its general contract!

Stack Overflow | Dan | 5 months ago
  1. 0

    Comparator breaching general contract

    Stack Overflow | 5 months ago | Dan
    java.lang.IllegalArgumentException: Comparison method violates its general contract!
  2. 0

    Getting an exception as I create several labels off an array in Java (Swing)

    Stack Overflow | 3 years ago | krieg
    java.lang.IllegalArgumentException: Comparison method violates its general contract!
  3. 0

    What is going on here? Illegal Argument Exception w/ Violates Contract Error

    Stack Overflow | 4 years ago | frogeyedpeas
    java.lang.IllegalArgumentException: Comparison method violates its general contract!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I get hit with "Comparison method violates its general contract!" exception when I create/add more than a certain number of objects

    Stack Overflow | 4 years ago | user697683
    java.lang.IllegalArgumentException: Comparison method violates its general contract!
  6. 0

    What could possibly be wrong with this Comparator?

    Stack Overflow | 3 years ago | jackthehipster
    java.lang.IllegalArgumentException: Comparison method violates its general contract!

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Comparison method violates its general contract!

      at java.util.ComparableTimSort.mergeLo()
    2. Java RT
      EventDispatchThread.run
      1. java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:744)
      2. java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:481)
      3. java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:422)
      4. java.util.ComparableTimSort.sort(ComparableTimSort.java:222)
      5. java.util.Arrays.sort(Arrays.java:1246)
      6. javax.swing.DefaultRowSorter.sort(DefaultRowSorter.java:607)
      7. javax.swing.DefaultRowSorter.setSortKeys(DefaultRowSorter.java:319)
      8. javax.swing.DefaultRowSorter.toggleSortOrder(DefaultRowSorter.java:480)
      9. javax.swing.plaf.basic.BasicTableHeaderUI$MouseInputHandler.mouseClicked(BasicTableHeaderUI.java:112)
      10. java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270)
      11. java.awt.Component.processMouseEvent(Component.java:6538)
      12. javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      13. java.awt.Component.processEvent(Component.java:6300)
      14. java.awt.Container.processEvent(Container.java:2236)
      15. java.awt.Component.dispatchEventImpl(Component.java:4891)
      16. java.awt.Container.dispatchEventImpl(Container.java:2294)
      17. java.awt.Component.dispatchEvent(Component.java:4713)
      18. java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
      19. java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534)
      20. java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
      21. java.awt.Container.dispatchEventImpl(Container.java:2280)
      22. java.awt.Window.dispatchEventImpl(Window.java:2750)
      23. java.awt.Component.dispatchEvent(Component.java:4713)
      24. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      25. java.awt.EventQueue.access$500(EventQueue.java:97)
      26. java.awt.EventQueue$3.run(EventQueue.java:709)
      27. java.awt.EventQueue$3.run(EventQueue.java:703)
      28. java.security.AccessController.doPrivileged(Native Method)
      29. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      30. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      31. java.awt.EventQueue$4.run(EventQueue.java:731)
      32. java.awt.EventQueue$4.run(EventQueue.java:729)
      33. java.security.AccessController.doPrivileged(Native Method)
      34. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      35. java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      36. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      37. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      38. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      39. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      40. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      41. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      41 frames