Hi all,

We're using CLASSPATH together with our code and a 3rd party library.  The
library contains some poorly written comparators and uses of
Collections.binarySearch.  I say poorly written because in the comparator
implementation there is assumptions about the object types and that
assumption is causing me grief by way of a ClassCastException.

>From the comparator interface:

int compare(Object o1, Object o2);

The bad comparator implementation assumes that o1 is a Foo and o2 is a Bar.
This "works" when running on the Sum JRE implementation of
Ccollections.binarySearch but fails with the CLASSPATH's implementation
because the types are transposed.  

I will have a tough time changing the 3rd party library so I feel a little
stuck.  Any suggestions?  

If a goal of CLASSPATH is to be broadly useful does being "bug for bug"
compatible matter to you guys?  Would you consider this a bug?



Jim Murphy



_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to