mirror of https://github.com/apache/nifi.git
NIFI-7766 Getting initialize class org.apache.nifi.util.text.RegexDateTimeMatcher error in jsontreereader
check for null values returned by getZoneStrings()
This commit is contained in:
parent
aaab9ee0cf
commit
bdfe1f2370
|
@ -131,9 +131,10 @@ public class RegexDateTimeMatcher implements DateTimeMatcher {
|
|||
final StringBuilder zoneNamePatternBuilder = new StringBuilder();
|
||||
for (final String[] zoneNames : zoneStrings) {
|
||||
for (final String zoneName : zoneNames) {
|
||||
zoneNamePatternBuilder.append(Pattern.quote(zoneName)).append("|");
|
||||
|
||||
maxTimeZoneLength = Math.max(maxTimeZoneLength, zoneName.length());
|
||||
if (zoneName != null && !zoneName.isEmpty()) {
|
||||
zoneNamePatternBuilder.append(Pattern.quote(zoneName)).append("|");
|
||||
maxTimeZoneLength = Math.max(maxTimeZoneLength, zoneName.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue