public static String removeBrackets(String str) {
        if (StringUtils.isBlank(str)) {
            return "";
        }
        return str.replaceAll("[\\[\\]]", "");
    }
@Test
    void testRemoveBrackets() {
        assertEquals("2001:DB8:0:0:1::1", InternetAddressUtil.removeBrackets("[2001:DB8:0:0:1::1]"));
        assertEquals("2077", InternetAddressUtil.removeBrackets("[2077[]]]"));
        assertEquals("", InternetAddressUtil.removeBrackets(""));
        assertEquals("", InternetAddressUtil.removeBrackets(null));
    }