RSS-204: Fixed nullpointer when type has not dictionary in redactByRegEx
This commit is contained in:
parent
65c8b5280b
commit
610b549908
@ -50,12 +50,15 @@ public class EntitySearchUtils {
|
|||||||
|
|
||||||
Set<Entity> found = find(inputString, searchImplementation, details);
|
Set<Entity> found = find(inputString, searchImplementation, details);
|
||||||
|
|
||||||
if (details.getEntityType() == EntityType.RECOMMENDATION) {
|
if(type != null) {
|
||||||
Set<Entity> falseRecommendations = find(inputString, type.getFalseRecommendationsSearch(), details.withEntityType(EntityType.FALSE_RECOMMENDATION));
|
|
||||||
markFalsePositives(found, falseRecommendations);
|
if (details.getEntityType() == EntityType.RECOMMENDATION) {
|
||||||
} else {
|
Set<Entity> falseRecommendations = find(inputString, type.getFalseRecommendationsSearch(), details.withEntityType(EntityType.FALSE_RECOMMENDATION));
|
||||||
Set<Entity> falsePositives = find(inputString, type.getFalsePositiveSearch(), details.withEntityType(EntityType.FALSE_POSITIVE));
|
markFalsePositives(found, falseRecommendations);
|
||||||
markFalsePositives(found, falsePositives);
|
} else {
|
||||||
|
Set<Entity> falsePositives = find(inputString, type.getFalsePositiveSearch(), details.withEntityType(EntityType.FALSE_POSITIVE));
|
||||||
|
markFalsePositives(found, falsePositives);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user