Skip to content

Commit 951a0b0

Browse files
committed
Revert "iter"
This reverts commit 17432fe.
1 parent 17432fe commit 951a0b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/main/java/org/elasticsearch/index/mapper/IpFieldMapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ protected String contentType() {
568568
protected void parseCreateField(DocumentParserContext context) throws IOException {
569569
InetAddress address;
570570
String value = context.parser().textOrNull();
571-
boolean isNotNull = value != null || nullValue != null;
572571
try {
573572
address = value == null ? nullValue : InetAddresses.forString(value);
574573
} catch (IllegalArgumentException e) {
@@ -583,11 +582,11 @@ protected void parseCreateField(DocumentParserContext context) throws IOExceptio
583582
throw e;
584583
}
585584
}
586-
if (isNotNull) {
585+
if (address != null) {
587586
indexValue(context, address);
588587
}
589588
if (offsetsFieldName != null && context.isImmediateParentAnArray() && context.canAddIgnoredField()) {
590-
if (isNotNull) {
589+
if (address != null) {
591590
BytesRef sortableValue = new BytesRef(InetAddressPoint.encode(address));
592591
context.getOffSetContext().recordOffset(offsetsFieldName, sortableValue);
593592
} else {

0 commit comments

Comments
 (0)