Skip to content

Commit cf6701a

Browse files
author
Andrew Stucki
committed
fix up ignore missing usage
1 parent 5971781 commit cf6701a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/NetworkDirectionProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ private String getDirection(IngestDocument d) throws Exception {
119119
if (internalNetworksField != null) {
120120
@SuppressWarnings("unchecked")
121121
List<String> stringList = d.getFieldValue(internalNetworksField, networks.getClass(), ignoreMissing);
122+
if (stringList == null) {
123+
return null;
124+
}
122125
networks.addAll(stringList);
123-
} else if (internalNetworks != null) {
126+
} else {
124127
networks = internalNetworks.stream().map(network -> d.renderTemplate(network)).collect(Collectors.toList());
125128
}
126-
if (networks == null) {
127-
return null;
128-
}
129129

130130
String sourceIpAddrString = d.getFieldValue(sourceIpField, String.class, ignoreMissing);
131131
if (sourceIpAddrString == null) {

0 commit comments

Comments
 (0)