[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch to improve javadoc and exception message in DateFormat.parse
From: |
Mark Wielaard |
Subject: |
Re: patch to improve javadoc and exception message in DateFormat.parse |
Date: |
Mon, 28 Jun 2004 23:31:40 +0200 |
Hi Dalibor,
On Wed, 2004-06-16 at 22:38, Dalibor Topic wrote:
> attached is small patch for DateFormat.parse and its changelog.
Thanks. I committed a slightly reformatted patch that doesn't have a
line > 80 characters and updates the copyright year.
Cheers,
Mark
2003-06-27 Dalibor Topic <address@hidden>
* java/text/DateFormat.java (parse):
Improved javadoc. Improved exception message.
Index: java/text/DateFormat.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/DateFormat.java,v
retrieving revision 1.13
diff -u -r1.13 DateFormat.java
--- java/text/DateFormat.java 15 Jun 2004 22:40:39 -0000 1.13
+++ java/text/DateFormat.java 28 Jun 2004 21:29:37 -0000
@@ -1,5 +1,6 @@
/* DateFormat.java -- Class for formatting/parsing date/times
- Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -591,6 +592,7 @@
/**
* This method parses the specified date/time string.
*
+ * @param source The string to parse.
* @return The resultant date.
*
* @exception ParseException If the specified string cannot be parsed.
@@ -604,7 +606,8 @@
int index = pos.getErrorIndex();
if (index < 0)
index = pos.getIndex();
- throw new ParseException("invalid Date syntax", index);
+ throw new ParseException("invalid Date syntax in \""
+ + source + '\"', index);
}
return result;
}
signature.asc
Description: This is a digitally signed message part