From 10467906c4146ce006bfac9e78fe0dba025c2768 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Tue, 11 Jan 2011 12:36:43 -0500 Subject: [PATCH] 7000693: java.sql.Timestamp compareTo() issues using low values Reviewed-by: okutsu --- jdk/src/share/classes/java/sql/Timestamp.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/sql/Timestamp.java b/jdk/src/share/classes/java/sql/Timestamp.java index 411c04eb19e..f92a89a8778 100644 --- a/jdk/src/share/classes/java/sql/Timestamp.java +++ b/jdk/src/share/classes/java/sql/Timestamp.java @@ -473,7 +473,9 @@ public class Timestamp extends java.util.Date { * @since 1.4 */ public int compareTo(Timestamp ts) { - int i = super.compareTo(ts); + long thisTime = this.getTime(); + long anotherTime = ts.getTime(); + int i = (thisTime ts.nanos) { return 1;