This closes #117
LANG-1186 Fix NullPointerException in FastDateParser$TimeZoneStrategy
This commit is contained in:
Chas Honton 2015-12-17 07:43:55 -08:00
commit c8cc651651
3 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,7 @@
<body>
<release version="3.5" date="tba" description="tba">
<action issue="LANG-1186" type="fix" dev="chas" due-to="NickManley">Fix NullPointerException in FastDateParser$TimeZoneStrategy</action>
<action issue="LANG-1193" type="fix" dev="sebb" due-to="Qin Li">ordinalIndexOf("abc", "ab", 1) gives incorrect answer of -1 (correct answer should be 0); revert fix for LANG-1077</action>
<action issue="LANG-1182" type="update" dev="britter" due-to="Larry West, Pascal Schumacher">Clarify JavaDoc of StringUtils.containsAny()</action>
<action issue="LANG-1169" type="add" dev="lguibert" due-to="Rafal Glowinski, Robert Parr, Arman Sharif">Add StringUtils methods to compare a string to multiple strings</action>

View File

@ -855,6 +855,9 @@ public class FastDateParser implements DateParser, Serializable {
final TimeZone tz = TimeZone.getTimeZone(tzId);
for(int i= 1; i<zoneNames.length; ++i) {
String zoneName = zoneNames[i];
if (zoneName == null) {
break;
}
if (tzNames.put(zoneName.toLowerCase(locale), tz) == null) {
simpleQuote(sb.append('|'), zoneName);
}

View File

@ -33,7 +33,9 @@ public class FastDateParser_TimeZoneStrategyTest {
for(final String[] zone : zones) {
for(int t = 1; t<zone.length; ++t) {
final String tzDisplay = zone[t];
if (tzDisplay == null) {
break;
}
try {
parser.parse(tzDisplay);
}