private NameResolver of(final String targetAuthority, final Helper helper) {
        requireNonNull(targetAuthority, "targetAuthority");
        // Determine target ips
        final String[] hosts = PATTERN_COMMA.split(targetAuthority);
        final List<EquivalentAddressGroup> targets = new ArrayList<>(hosts.length);
        for (final String host : hosts) {
            final URI uri = URI.create("//" + host);
            int port = uri.getPort();
            if (port == -1) {
                port = helper.getDefaultPort();
            }
            targets.add(new EquivalentAddressGroup(new InetSocketAddress(uri.getHost(), port)));
        }
        if (targets.isEmpty()) {
            throw new IllegalArgumentException("Must have at least one target, but was: " + targetAuthority);
        }
        return new StaticNameResolver(targetAuthority, targets);
    }
private NameResolver of ( final String targetAuthority , final Helper helper ) { requireNonNull ( targetAuthority , "targetAuthority" ) ; final String [ ] hosts = PATTERN_COMMA . split ( targetAuthority ) ; final List < EquivalentAddressGroup > targets = new ArrayList < > ( hosts . length ) ; for ( final String host : hosts ) { final URI uri = URI . create ( "//" + host ) ; int port = uri . getPort ( ) ; if ( port == - 1 ) { port = helper . getDefaultPort ( ) ; } targets . add ( new EquivalentAddressGroup ( new InetSocketAddress ( uri . getHost ( ) , port ) ) ) ; } if ( targets . isEmpty ( ) ) { throw new IllegalArgumentException ( "Must have at least one target, but was: " + targetAuthority ) ; } return new StaticNameResolver ( targetAuthority , targets ) ; }
Creates a new {@link NameResolver} for the given authority and attributes.

@param targetAuthority The authority to connect to.
@param helper Optional parameters that customize the resolve process.
@return The newly created name resolver for the given target.