File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/main/java/com/fasterxml/jackson/databind/util Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ protected Date parseAsISO8601(String dateStr, ParsePosition pos)
596
596
}
597
597
}
598
598
599
- protected Date _parseAsISO8601 (String dateStr , ParsePosition pos )
599
+ protected Date _parseAsISO8601 (String dateStr , ParsePosition bogus )
600
600
throws IllegalArgumentException , ParseException
601
601
{
602
602
final int totalLen = dateStr .length ();
@@ -680,8 +680,7 @@ protected Date _parseAsISO8601(String dateStr, ParsePosition pos)
680
680
throw new ParseException (String .format (
681
681
"Cannot parse date \" %s\" : invalid fractional seconds '%s'; can use at most 9 digits" ,
682
682
dateStr , m .group (1 ).substring (1 )
683
- ),
684
- pos .getErrorIndex ());
683
+ ), start );
685
684
}
686
685
// fall through
687
686
case 3 :
@@ -704,7 +703,9 @@ protected Date _parseAsISO8601(String dateStr, ParsePosition pos)
704
703
throw new ParseException
705
704
(String .format ("Cannot parse date \" %s\" : while it seems to fit format '%s', parsing fails (leniency? %s)" ,
706
705
dateStr , formatStr , _lenient ),
707
- pos .getErrorIndex ());
706
+ // [databind#1742]: Might be able to give actual location, some day, but for now
707
+ // we can't give anything more indicative
708
+ 0 );
708
709
}
709
710
710
711
private static int _parse4D (String str , int index ) {
You can’t perform that action at this time.
0 commit comments