File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
server/src/main/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments