Reviewers: jat,

Description:
If a date string ends in a forward slash, DateTimeFormat can throw an
uncaught IndexOutOfBoundsException when trying to parseInt an expected
integer after the slash.  subParseYear has the same problem.

In addition, if an integer is not found for a variety of parts, -1 is
used by default instead of throwing an IllegalArgumentException.

Fix:
====
Adding checks in parseInt and subParseYear to ensure that we don't throw
an IndexOutOfBoundsException.

Also added checks to ensure that we throw IllegalArgumentExceptions if
the other integer components aren't specified.

Please review this at http://gwt-code-reviews.appspot.com/159802

Affected files:
  user/src/com/google/gwt/i18n/client/DateTimeFormat.java
  user/test/com/google/gwt/i18n/client/DateTimeFormat_en_Test.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to