java.lang.ClassCastException: java.lang.Thread cannot be cast to java.lang.Comparable

GitHub | docent | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    map() broken for Multimap backed by SortedSet with comparator

    GitHub | 8 months ago | docent
    java.lang.ClassCastException: java.lang.Thread cannot be cast to java.lang.Comparable

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Thread cannot be cast to java.lang.Comparable

      at javaslang.Tuple2.compareTo()
    2. javaslang
      Tuple2.compareTo
      1. javaslang.Tuple2.compareTo(Tuple2.java:81)
      2. javaslang.Tuple2.compareTo(Tuple2.java:97)
      3. javaslang.Tuple2.compareTo(Tuple2.java:29)
      3 frames
    3. javaslang.collection
      Multimap.map
      1. javaslang.collection.Comparators.lambda$naturalComparator$7c28a3e$1(Comparators.java:30)
      2. javaslang.collection.RedBlackTreeModule$Node.insert(RedBlackTree.java:656)
      3. javaslang.collection.RedBlackTree.insert(RedBlackTree.java:97)
      4. javaslang.collection.RedBlackTree.ofAll(RedBlackTree.java:84)
      5. javaslang.collection.TreeSet.ofAll(TreeSet.java:206)
      6. javaslang.collection.TreeSet.map(TreeSet.java:715)
      7. javaslang.collection.TreeSet.map(TreeSet.java:720)
      8. javaslang.collection.TreeSet.map(TreeSet.java:32)
      9. javaslang.collection.AbstractMultimap.lambda$iterator$9(AbstractMultimap.java:303)
      10. javaslang.collection.Iterator$35.hasNext(Iterator.java:1487)
      11. javaslang.collection.Iterator.map(Iterator.java:1578)
      12. javaslang.collection.Multimap.map(Multimap.java:389)
      12 frames