> +        try {
> +            String encoded = URLEncoder.encode(value, DEFAULT_ENCODING);
> +
> +            Matcher matcher = ENCODED_CHARACTERS_PATTERN.matcher(encoded);
> +            StringBuffer buffer = new StringBuffer(encoded.length());
> +
> +            while (matcher.find()) {
> +                String replacement = matcher.group(0);
> +
> +                if ("+".equals(replacement)) {
> +                    replacement = "%20";
> +                } else if ("*".equals(replacement)) {
> +                    replacement = "%2A";
> +                } else if ("%7E".equals(replacement)) {
> +                    replacement = "~";
> +                }

Does Guava `UrlEscapers` do the same thing?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/678/files#r24491973

Reply via email to