api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayAddress.java
public static int parsePort(final String address) {
        int sp = address.indexOf(":");
        if (sp == -1 && sp + 1 >= address.length()) {
            throw new IllegalArgumentException("not found port '" + address + "'");
        }

        try {
            return Integer.parseInt(address.substring(sp + 1, address.length()).trim());
        } catch (NumberFormatException nfe) {
            throw new IllegalArgumentException("bad port number '" + address + "'");
        }
    }
public static int parsePort(final String address) {
        int sp = address.indexOf(":");
        if (sp == -1 && sp + 1 >= address.length()) {
            throw new IllegalArgumentException("not found port '" + address + "'");
        }

        try {
            return Integer.parseInt(address.substring(sp + 1, address.length()).trim());
        } catch (NumberFormatException nfe) {
            throw new IllegalArgumentException("bad port number '" + address + "'");
        }
    }
Parses the port.

@param address the address
@return the int