Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2133

ClassHierarchyComparator implementation seems wrong

    XMLWordPrintable

Details

    Description

      I don't know where ClassHierarchyComparator is used but I believe the implementation will not sort correctly (using Collections.sort(List, Comparator)) when the list contains classes that do not all belSubFoo,SubBaz,Foo,Baz,Bar,ong to the same hierarchy path.

      https://github.com/weld/core/blob/master/impl/src/main/java/org/jboss/weld/bean/proxy/ClassHierarchyComparator.java

      I believe the last line should be something like:

      return c1.getName().compareTo(c2.getName()); //sort consistently

      instead of

      return 0;

      Attachments

        Issue Links

          Activity

            People

              mkouba@redhat.com Martin Kouba
              kobogianhitis jamie smith (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: