[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/30061] Comparator interface arguments get reversed
From: |
csm at gnu dot org |
Subject: |
[Bug classpath/30061] Comparator interface arguments get reversed |
Date: |
5 Dec 2006 20:20:18 -0000 |
------- Comment #3 from csm at gnu dot org 2006-12-05 20:20 -------
If I understand this bug correctly, you are saying that Classpath's
binarySearch implementation is calling your Comparator with the arguments
ordered differently than you expect. From your test case it also sounds like
you are expecting the first argument to be of one type, and the second another
type. This is not guaranteed, in fact requiring that will break the contract of
Comparator.compare.
It's perfectly valid for us to order our arguments to compare() that way. Your
Comparator implementation is wrong.
--
csm at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30061
- [Bug classpath/30061] New: Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/04
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/04
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/05
- [Bug classpath/30061] Comparator interface arguments get reversed,
csm at gnu dot org <=
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/06
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/06
- [Bug classpath/30061] Comparator interface arguments get reversed, csm at gnu dot org, 2006/12/06
- [Bug classpath/30061] Comparator interface arguments get reversed, csm at gnu dot org, 2006/12/06
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/07
- [Bug classpath/30061] Comparator interface arguments get reversed, csm at gnu dot org, 2006/12/07
- [Bug classpath/30061] Comparator interface arguments get reversed, dwhire at yahoo dot com, 2006/12/07