Fix NullPointerException in PartialDimExtractionFn by explicity checking for dimValue == null, attempt 2

This commit is contained in:
Maarten Rijke 2014-12-08 20:11:58 +01:00
parent bd9bbf396c
commit 90670a9c7e
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ public class PartialDimExtractionFn implements DimExtractionFn
@Override @Override
public String apply(String dimValue) public String apply(String dimValue)
{ {
if (dimValue == null) return null; dimValue = (dimValue == null) ? "" : dimValue;
Matcher matcher = pattern.matcher(dimValue); Matcher matcher = pattern.matcher(dimValue);
return matcher.find() ? dimValue : null; return matcher.find() ? dimValue : null;
} }