Hi all, I'm experiencing the same issue using GWT 1.7. Browsers tested: Firefox 3.5.3 (Mac OSX), Safari 4 (Mac OSX), Firefox 3.0 (Linux).
I haven't tested the java.util.Date.compareTo(Date) output directly, I simply found that the result of Collections.sort(List<MyBean>, Comparator<MyBean>) is not correct if the comparator delegates the return value to Date.compareTo(Date). The result becomes correct if I replace the Date.compareTo(Date) statement with a logically equivalent code snippet which uses Date.getTime(). Regards, Marco On 25 Ago, 22:32, Thomas Broyer <[email protected]> wrote: > On 25 août, 16:52, pipo <[email protected]> wrote: > > > it seems the method Date.compareTo(Date myDate) does not work with the > > compiled version on GWT client side code but work perfectly in Web > > Hosted mode. > > That's because hosted mode uses the pure-Java Date while web mode > ("compiled version") uses a JavaScript emulation. > > > Is it normal or is it a bug? > > It isn't normal, but compareTo looks > fine:http://code.google.com/p/google-web-toolkit/source/browse/releases/1.... > ...and further mode it is > unit-tested:http://code.google.com/p/google-web-toolkit/source/browse/releases/1.... > > > > > Instead of compareTo() I compare two dates using getTime() method. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
