Skip to content

Commit 3b6b67f

Browse files
authored
Added missing null check in SimpleDateFormat parse() (#4377)
1 parent adebe5d commit 3b6b67f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodenameOne/src/com/codename1/l10n/SimpleDateFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ public Date parse(String source) throws ParseException {
561561
switch (patternChar) {
562562
case LITERAL_LETTER:
563563
s = readLiteral(source, startIndex, token);
564-
if (!s.equalsIgnoreCase(token)) {
564+
if (s == null || !s.equalsIgnoreCase(token)) {
565565
throw new ParseException("Unparseable string " + source, startIndex);
566566
}
567567
break;

0 commit comments

Comments
 (0)