mirror of
https://github.com/apache/druid.git
synced 2025-02-17 15:35:56 +00:00
Fix NullPointerException in PartialDimExtractionFn by explicity checking for dimValue == null
This commit is contained in:
parent
703470eea5
commit
bd9bbf396c
@ -58,6 +58,7 @@ public class PartialDimExtractionFn implements DimExtractionFn
|
||||
@Override
|
||||
public String apply(String dimValue)
|
||||
{
|
||||
if (dimValue == null) return null;
|
||||
Matcher matcher = pattern.matcher(dimValue);
|
||||
return matcher.find() ? dimValue : null;
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ public class PartialDimExtractionFnTest
|
||||
"Vancouver",
|
||||
"Pretoria",
|
||||
"Wellington",
|
||||
null,
|
||||
"Ontario"
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user