This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch branch-2.10 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 663ebe071a4a1decd93b5ee2ac66eb6587627334 Author: Lari Hotari <[email protected]> AuthorDate: Wed Apr 20 11:54:51 2022 +0300 Improve skipping of DNS resolution when creating AuthenticationDataHttp instance (#15228) - improves solution added in #15221 - It's better to use the JDK provided InetSocketAddress.createUnresolved method to prevent unnecessary DNS resolution (cherry picked from commit e71b98ae157c4c108802661eaa72913e9c9e0bef) --- .../apache/pulsar/broker/authentication/AuthenticationDataHttp.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java index 75a75225576..f48dbc263e0 100644 --- a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java +++ b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java @@ -18,7 +18,6 @@ */ package org.apache.pulsar.broker.authentication; -import io.netty.util.NetUtil; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.servlet.http.HttpServletRequest; @@ -35,9 +34,7 @@ public class AuthenticationDataHttp implements AuthenticationDataSource { throw new IllegalArgumentException(); } this.request = request; - this.remoteAddress = - new InetSocketAddress(NetUtil.createInetAddressFromIpAddressString(request.getRemoteAddr()), - request.getRemotePort()); + this.remoteAddress = InetSocketAddress.createUnresolved(request.getRemoteAddr(), request.getRemotePort()); } /*
