Your code should not work, also not on 1.4, if the API documentation says that the object must be a Timestamp object.
If it does work on
Java 1.4, then that's a bug in Java 1.4. If your program relies on this bug, then
you should correct your program, because you don't want your program to rely on a bug in a particular Java version.
Have a look at this bug description in Sun's bug database:
Bug ID: 4631234 - java.sql.Timestamp.compareTo no longer accepts java.util.Dates in 1.4 [ February 20, 2007: Message edited by: Jesper Young ]