private static String getHostAddress(InetSocketAddress addr) {
        final String value = addr.getAddress().getHostAddress();
        final int percentIdx = value.indexOf('%');
        return percentIdx < 0 ? value : value.substring(0, percentIdx);
    }
Returns the IP address of the given {@link InetSocketAddress}, stripping the scope ID if necessary.
core/src/main/java/com/linecorp/armeria/client/DefaultDnsQueryLifecycleObserver.java