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 belong 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;
|