classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collections.binarySearch and poorly written comparators


From: Tom Tromey
Subject: Re: Collections.binarySearch and poorly written comparators
Date: 20 Dec 2005 17:16:56 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Jim" == Jim Murphy <address@hidden> writes:

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

Yeah.  We actually hit this in Eclipse once.  In that case we were
able to fix it upstream.

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

There's no question that there is a bug in the library you're using
:-)

I'm ambivalent about fixing this in Classpath.  There was a similar
case recently where in the end I think we decided not to make a
decision... I guess you could force the issue by writing a patch for
review.  Then somebody would actually have to take a stand.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]