ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Belyak (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-6749) Illegal comparsion in NodeOrderComparator
Date Wed, 25 Oct 2017 07:53:00 GMT
Alexander Belyak created IGNITE-6749:

             Summary: Illegal comparsion in NodeOrderComparator
                 Key: IGNITE-6749
                 URL: https://issues.apache.org/jira/browse/IGNITE-6749
             Project: Ignite
          Issue Type: Bug
      Security Level: Public (Viewable by anyone)
          Components: general
    Affects Versions: 2.1
            Reporter: Alexander Belyak
             Fix For: 2.4

In org.apache.ignite.internal.cluster.compare method code
        Object consId1 = n1.consistentId();
        Object consId2 = n2.consistentId();

        if (consId1 instanceof Comparable && consId2 instanceof Comparable) {
            return ((Comparable)consId1).compareTo(consId2);
check only that consId1 and consId2 is Comparable, but they may not be Comparable to each
other. For example: String and UUID is comparable, but UUID.compareTo(String) throw ClassCastException.

This message was sent by Atlassian JIRA

View raw message