mirror of https://github.com/apache/nifi.git
NIFI-4103: Return an empty Optional if an IP address cannot be found
Signed-off-by: Matt Burgess <mattyb149@apache.org> This closes #1933
This commit is contained in:
parent
ff65b42e88
commit
8878d732dd
|
@ -338,6 +338,10 @@ public class IPLookupService extends AbstractControllerService implements Record
|
|||
anonymousIpRecord = null;
|
||||
}
|
||||
|
||||
if (geoRecord == null && ispRecord == null && domainName == null && connectionType == null && anonymousIpRecord == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
return Optional.ofNullable(createContainerRecord(geoRecord, ispRecord, domainName, connectionType, anonymousIpRecord));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue