LANG-1285: NullPointerException in FastDateParser$TimeZoneStrategy (closes #212)

Replicate the fix for LANG-1186
This commit is contained in:
Francesco Chicchiriccò 2016-11-16 07:07:43 +01:00 committed by pascalschumacher
parent fd80301b1e
commit c14890f08b

View File

@ -866,11 +866,13 @@ private static class TzInfo {
tzInfo = standard;
break;
}
final String key = zoneNames[i].toLowerCase(locale);
// ignore the data associated with duplicates supplied in
// the additional names
if (sorted.add(key)) {
tzNames.put(key, tzInfo);
if (zoneNames[i] != null) {
final String key = zoneNames[i].toLowerCase(locale);
// ignore the data associated with duplicates supplied in
// the additional names
if (sorted.add(key)) {
tzNames.put(key, tzInfo);
}
}
}
}