tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyallex <lyal...@gmail.com>
Subject Re: This is just plain ... odd.
Date Thu, 08 Nov 2012 19:36:20 GMT
> [snip]
>



> You got the same (wrongish) results since you gave the sort the same order
> in
> the list.  I can't recall how merge sort can freak out when given
> conflicting
> compares, I seem to recall that you might get an endless loop under some
> circumstances as it orders and reorders the same group of objects.
>

This is all very interesting, no really it is, but it doesn't really answer
the original question
which is that given the same initial data in the same initial order and
executing exactly the same code in the
same release of Java produces different results.

The only difference between the two executions is the fact that the test
code executes in
it's own instance of the JVM whereas the other execution runs in an
instance shared with the container.

I accept that the behaviour may be undefined even though it is consistently
repeatable in both environments
but surely given everything else being equal the results should be the same
... or maybe I'm just losing the plot.

Lyallex

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