diff -r 39484c6a0c61 -r 47760e45a1dd jdk/src/share/classes/java/text/SimpleDateFormat.java --- a/jdk/src/share/classes/java/text/SimpleDateFormat.java Thu Jun 06 16:45:25 2013 -0700 +++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java Fri Jun 07 17:07:12 2013 +0900 @@ -1845,6 +1845,8 @@ } ++pos.index; } + // Remember the actual start index + int actualStart = pos.index; parsing: { @@ -1924,9 +1926,9 @@ // we made adjustments to place the 2-digit year in the proper // century, for parsed strings from "00" to "99". Any other string // is treated literally: "2250", "-1", "1", "002". - if (count <= 2 && (pos.index - start) == 2 - && Character.isDigit(text.charAt(start)) - && Character.isDigit(text.charAt(start+1))) { + if (count <= 2 && (pos.index - actualStart) == 2 + && Character.isDigit(text.charAt(actualStart)) + && Character.isDigit(text.charAt(actualStart + 1))) { // Assume for example that the defaultCenturyStart is 6/18/1903. // This means that two-digit years will be forced into the range // 6/18/1903 to 6/17/2003. As a result, years 00, 01, and 02