Index: src/test/java/org/apache/harmony/text/tests/java/text/DateFormatTest.java =================================================================== --- src/test/java/org/apache/harmony/text/tests/java/text/DateFormatTest.java (revision 465957) +++ src/test/java/org/apache/harmony/text/tests/java/text/DateFormatTest.java (working copy) @@ -19,6 +19,7 @@ import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.NumberFormat; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; @@ -445,4 +446,17 @@ format.setNumberFormat(f1); assertTrue("Not identical NumberFormat", f1 == format.getNumberFormat()); } + + /** + * @tests java.text.DateFormat#parse(String) + */ + public void test_parse_LString() { + DateFormat format = DateFormat.getInstance(); + try { + format.parse("not a Date"); + fail("should throw ParseException first"); + } catch (ParseException e) { + assertNotNull(e.getMessage()); + } + } } Index: src/main/java/java/text/DateFormat.java =================================================================== --- src/main/java/java/text/DateFormat.java (revision 465957) +++ src/main/java/java/text/DateFormat.java (working copy) @@ -506,7 +506,7 @@ ParsePosition position = new ParsePosition(0); Date date = parse(string, position); if (position.getErrorIndex() != -1 || position.getIndex() == 0) { - throw new ParseException(null, position.getErrorIndex()); + throw new ParseException(("Unparseable date: " + string), position.getErrorIndex()); } return date; }