Skip to content

Commit 7561f58

Browse files
committed
Fix forbidden API
1 parent 33c069e commit 7561f58

File tree

1 file changed

+2
-1
lines changed
  • x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext

1 file changed

+2
-1
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
1212

1313
import org.apache.lucene.util.BytesRef;
14+
import org.elasticsearch.common.network.NetworkAddress;
1415
import org.elasticsearch.xpack.core.security.authc.support.mapper.expressiondsl.FieldExpression;
1516
import org.elasticsearch.xpack.esql.EsqlTestUtils;
1617
import org.elasticsearch.xpack.esql.core.expression.Expression;
@@ -121,7 +122,7 @@ public static Object randomQuery(DataType dataType) {
121122
case VERSION -> value = new Version(bytesRef).toString();
122123
case IP -> {
123124
try {
124-
value = InetAddress.getByAddress(bytesRef.bytes).getHostAddress();
125+
value = NetworkAddress.format(InetAddress.getByAddress(bytesRef.bytes));
125126
} catch (UnknownHostException e) {
126127
throw new IllegalArgumentException(e);
127128
}

0 commit comments

Comments
 (0)