@Override
    public Url parse(String url) {
        if (StringUtils.isBlank(url)) {
            throw new IllegalArgumentException("Illegal format address string [" + url
                                               + "], should not be blank! ");
        }
        Url parsedUrl = this.tryGet(url);
        if (null != parsedUrl) {
            return parsedUrl;
        }

        String ip = null;
        String port = null;
        Properties properties = null;

        int size = url.length();
        int pos = 0;
        int pathEndIdx = url.indexOf(QUES);
        if (pathEndIdx < 0) {
            pathEndIdx = size - 1;
        } else {
            pathEndIdx = pathEndIdx - 1;
        }

        int lastColon = -1;
        for (int i = pathEndIdx; i >= 0; i--) {
            if (url.charAt(i) == COLON) {
                lastColon = i;
                break;
            }
        }

        if (lastColon < 0) {
            throw new IllegalArgumentException("Illegal format address string [" + url
                                               + "], must have one COLON[:]! ");
        }

        // should not end with COLON
        if (lastColon == size - 1) {
            throw new IllegalArgumentException("Illegal format address string [" + url
                                               + "], should not end with COLON[:]! ");
        }
        ip = url.substring(pos, lastColon);
        pos = lastColon;

        for (int i = pos; i < size; ++i) {
            if (QUES == url.charAt(i)) {
                port = url.substring(pos + 1, i);
                pos = i;
                if (i == size - 1) {
                    // should not end with QUES
                    throw new IllegalArgumentException("Illegal format address string [" + url
                                                       + "], should not end with QUES[?]! ");
                }
                break;
            }
            // end without a QUES
            if (i == size - 1) {
                port = url.substring(pos + 1, i + 1);
                pos = size;
            }
        }

        if (pos < (size - 1)) {
            properties = new Properties();
            while (pos < (size - 1)) {
                String key = null;
                String value = null;
                for (int i = pos; i < size; ++i) {
                    if (EQUAL == url.charAt(i)) {
                        key = url.substring(pos + 1, i);
                        pos = i;
                        if (i == size - 1) {
                            // should not end with EQUAL
                            throw new IllegalArgumentException(
                                "Illegal format address string [" + url
                                        + "], should not end with EQUAL[=]! ");
                        }
                        break;
                    }
                    if (i == size - 1) {
                        // must have one EQUAL
                        throw new IllegalArgumentException("Illegal format address string [" + url
                                                           + "], must have one EQUAL[=]! ");
                    }
                }
                for (int i = pos; i < size; ++i) {
                    if (AND == url.charAt(i)) {
                        value = url.substring(pos + 1, i);
                        pos = i;
                        if (i == size - 1) {
                            // should not end with AND
                            throw new IllegalArgumentException("Illegal format address string ["
                                                               + url
                                                               + "], should not end with AND[&]! ");
                        }
                        break;
                    }
                    // end without more AND
                    if (i == size - 1) {
                        value = url.substring(pos + 1, i + 1);
                        pos = size;
                    }
                }
                properties.put(key, value);
            }
        }
        parsedUrl = new Url(url, ip, Integer.parseInt(port), properties);
        this.initUrlArgs(parsedUrl);
        Url.parsedUrls.put(url, new SoftReference<Url>(parsedUrl));
        return parsedUrl;
    }
@see com.alipay.remoting.RemotingAddressParser#parse(java.lang.String)
src/main/java/com/alipay/remoting/rpc/RpcAddressParser.java