public static String toHostAndPortString(String host, int port, int noPort) {
        // don't validation hostName
        // don't validation port range
        if (noPort == port) {
            return host;
        }
        final int hostLength = StringUtils.getLength(host);
        final StringBuilder builder = new StringBuilder(hostLength + 6);
        builder.append(host);
        builder.append(':');
        builder.append(port);
        return builder.toString();
    }
This API does not verification for input args.
commons/src/main/java/com/navercorp/pinpoint/common/plugin/util/HostAndPort.java