brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Brooklyn node and cluster upgrade
Date Mon, 03 Nov 2014 15:44:25 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: utils/common/src/main/java/brooklyn/util/net/ ---
    @@ -142,6 +143,11 @@ public static String mergePaths(String ...items) {
         public static String encode(String text) {
             return URLEncoder.encode(text);
    +    /** As {@link #encode(String)} */
    +    @SuppressWarnings("deprecation")
    +    public static String decode(String text) {
    +        return URLDecoder.decode(text);
    --- End diff --
    Will this work as expected? The `` is for "HTML form decoding" (e.g.
"+" is converted to a space). But quite a few stackoverflow answers talk about just using
`URLDecoder` for each part of the URI.
    There is also a guava discussion about adding a decoder to complement ``
( but that functionality is not available in guava
    Also, why not pass "UTF-8" as the encoding scheme, rather than calling the deprecated
method? The javadoc says "Note: The World Wide Web Consortium Recommendation states that UTF-8
should be used. Not doing so may introduce incompatibilites."

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message