public static String[] splitIPPortStr(String address) {
        if (StringUtils.isBlank(address)) {
            throw new IllegalArgumentException("ip and port string cannot be empty!");
        }
        if (address.charAt(0) == '[') {
            address = removeBrackets(address);
        }
        String[] serverAddArr = null;
        int i = address.lastIndexOf(Constants.IP_PORT_SPLIT_CHAR);
        if (i > -1) {
            serverAddArr = new String[2];
            String hostAddress = address.substring(0,i);
            if (hostAddress.contains("%")) {
                hostAddress = hostAddress.substring(0, hostAddress.indexOf("%"));
            }
            serverAddArr[0] = hostAddress;
            serverAddArr[1] = address.substring(i + 1);
        }
        return serverAddArr;
    }
@Test
    public void testSplitIPPortStr() {
        String[] ipPort = new String[]{"127.0.0.1","8080"};
        assertThat(NetUtil.splitIPPortStr("127.0.0.1:8080")).isEqualTo(ipPort);
        ipPort = new String[]{"::","8080"};
        assertThat(NetUtil.splitIPPortStr("[::]:8080")).isEqualTo(ipPort);
        ipPort = new String[]{"2000:0000:0000:0000:0001:2345:6789:abcd","8080"};
        assertThat(NetUtil.splitIPPortStr("2000:0000:0000:0000:0001:2345:6789:abcd%10:8080")).isEqualTo(ipPort);
        ipPort = new String[]{"2000:0000:0000:0000:0001:2345:6789:abcd","8080"};
        assertThat(NetUtil.splitIPPortStr("[2000:0000:0000:0000:0001:2345:6789:abcd]:8080")).isEqualTo(ipPort);
        ipPort = new String[]{"::FFFF:192.168.1.2","8080"};
        assertThat(NetUtil.splitIPPortStr("::FFFF:192.168.1.2:8080")).isEqualTo(ipPort);
        ipPort = new String[]{"::FFFF:192.168.1.2","8080"};
        assertThat(NetUtil.splitIPPortStr("[::FFFF:192.168.1.2]:8080")).isEqualTo(ipPort);
    }