commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch to improve javadoc and exception message in DateFormat.parse


From: Dalibor Topic
Subject: patch to improve javadoc and exception message in DateFormat.parse
Date: Wed, 16 Jun 2004 22:38:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608

Hi all,

attached is small patch for DateFormat.parse and its changelog. OK to commit?

cheers,
dalibor topic
--- /tmp/topic/classpath/java/text/DateFormat.java      Wed Jun 16 20:37:28 2004
+++ java/text/DateFormat.java   Wed Jun 16 21:54:41 2004
@@ -591,6 +591,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 +605,7 @@
        int index = pos.getErrorIndex();
        if (index < 0)
          index = pos.getIndex();
-       throw new ParseException("invalid Date syntax", index);
+       throw new ParseException("invalid Date syntax in string \"" + source + 
'\"', index);
       }
     return result;
   }
2003-06-16  Dalibor Topic  <address@hidden>

        * java/text/DateFormat.java
        (parse) Improved javadoc. Improved exception message.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]