postgresql-jdbc.git / summary / log / commit / refs
commit 278cd98fe7c311ea69575e2076b436eccaf80ccd
Author: Kris Jurka <books@ejurka.com>
Date: Mon Apr 16 17:05:52 2007 +0000
In an error message reporting an unparseable timestamp value the
code was trying to put the unparseable portion into the error
message, but used the wrong variable to get the correct length.
org/postgresql/jdbc2/TimestampUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/org/postgresql/jdbc2/TimestampUtils.java b/org/postgresql/jdbc2/TimestampUtils.java
index 77c1cae0..28abc352 100644
--- a/org/postgresql/jdbc2/TimestampUtils.java
+++ b/org/postgresql/jdbc2/TimestampUtils.java
@@ -3,7 +3,7 @@
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/TimestampUtils.java,v 1.19 2006/04/29 02:33:46 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/TimestampUtils.java,v 1.20 2007/01/05 00:34:06 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -223,7 +223,7 @@ public class TimestampUtils {
}
if (start < slen)
- throw new NumberFormatException("Trailing junk on timestamp: '" + new String(s, start, end - start) + "'");
+ throw new NumberFormatException("Trailing junk on timestamp: '" + new String(s, start, slen - start) + "'");
if (!result.hasTime && !result.hasDate)
throw new NumberFormatException("Timestamp has neither date nor time");
[parent: 0839e58e2817]