Agreed, I've filed a new bug agains Eclipse [1]. SY, Alexey
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=187223 2007/5/16, Oliver Deakin <[EMAIL PROTECTED]>:
Agreed. Should sort() be expected to behave like the RI for invalid comparators? IMHO the answer is no. I think in this case a bug should be raised with Eclipse to get the test fixed. Regards, Oliver Aleksey Ignatenko wrote: > The only fix for all related issues is to have the same implementation of > such functionality as RI, as you understand it is unreachable goal unless > you use RI classlib. So therefore I would say the right solution is to > fix > tests. > > Aleksey. > > > On 5/16/07, Sergey Kuksenko <[EMAIL PROTECTED]> wrote: >> >> As we discussed the source of the errror is incorrect comparator. >> However, I can suggest a patch to Arrays which makes Arrays.sort() >> slightly >> close to RI. >> With the patch sorting algorithm is not changed, but >> ArraysSortTest.javais >> passed as on RI. >> The patch is attached to the issue. >> >> On 5/16/07, Aleksey Ignatenko <[EMAIL PROTECTED]> wrote: >> > >> > From H-3339 comment: >> > >> > As the bug is in the tests then it is to be filed on Eclipse and this >> JIRA >> > closed with comment about Eclipse bug. >> > Please, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=176157 as >> > example >> > of Harmony related bug. >> > >> > BR, >> > Aleksey Ignatenko. >> > >> > On 5/15/07, Sergey Kuksenko <[EMAIL PROTECTED]> wrote: >> > > >> > > Hi All, >> > > >> > > As you wrote in the JIRA the reason of failure is incorrect >> Comparator >> > > which >> > > is used in the test. >> > > The Comparator violates the follwing rule from specification: >> > > "The implementor must ensure that sgn(compare(x, y)) == >> > > -sgn(compare(y, x))for all >> > > x and y." >> > > So I thing that It would be more correct to fix a comparator from >> test. >> > > >> > > Some words about bug2bug compatibility. The fact that RI has >> different >> > > result on this comparator means nothing, because in case of >> different >> > > incorect comparator RI may give a different unpredictable >> results. So >> > > should >> > > we check *all possible set of incorrect comparators* and move >> exactly >> in >> > > same results as done by RI? >> > > I think that it will mean that we should have completely the same >> > > implementation of sorting. >> > > >> > > >> > > >> > > On 5/15/07, Eugene Ostrovsky <[EMAIL PROTECTED]> wrote: >> > > > >> > > > Hi all. >> > > > >> > > > Some of eclipse tests pass on RI but fail on harmony. See >> > > > *HARMONY-3339<https://issues.apache.org/jira/browse/HARMONY-3339> >> > > > * . >> > > > The tests are incorrect. They pass on RI due to difference in >> > > > implementation >> > > > of Arrays.sort() method. >> > > > >> > > > Shall we alter our Array.sort() implementation to be consistent >> with >> > RI >> > > > ant >> > > > to make these buggy tests pass? >> > > > >> > > > Thanks, >> > > > Eugene. >> > > > >> > > >> > > >> > > >> > > -- >> > > Best regards, >> > > --- >> > > Sergey Kuksenko. >> > > Intel Enterprise Solutions Software Division. >> > > >> > >> >> >> >> -- >> Best regards, >> --- >> Sergey Kuksenko. >> Intel Enterprise Solutions Software Division. >> > -- Oliver Deakin Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
