harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Kuksenko" <sergey.kukse...@gmail.com>
Subject Re: [classlib][luni] Arrays.sort() incompatibility with RI
Date Tue, 15 May 2007 15:10:15 GMT
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 <eugene.s.ostrovsky@gmail.com> 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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message