Merged gcj-eclipse branch to trunk.

From-SVN: r120621
This commit is contained in:
Tom Tromey 2007-01-09 19:58:05 +00:00
parent c648dedbde
commit 97b8365caf
17478 changed files with 606493 additions and 100744 deletions

View file

@ -917,7 +917,25 @@ public class SimpleDateFormat extends DateFormat
|| ((ch < 'a' || ch > 'z')
&& (ch < 'A' || ch > 'Z')))
{
if (! expect (dateStr, pos, ch))
if (quote_start == -1 && ch == ' ')
{
// A single unquoted space in the pattern may match
// any number of spaces in the input.
int index = pos.getIndex();
int save = index;
while (index < dateStr.length()
&& Character.isWhitespace(dateStr.charAt(index)))
++index;
if (index > save)
pos.setIndex(index);
else
{
// Didn't see any whitespace.
pos.setErrorIndex(index);
return null;
}
}
else if (! expect (dateStr, pos, ch))
return null;
continue;
}