/**
 * This file is part of JICI, licensed under the MIT License (MIT).
 *
 * Copyright (c) 2015-2015 Aleksi Sapon <http://sapon.ca/jici/>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package ca.sapon.jici.util;

import java.util.List;

public final class StringUtil {
    private StringUtil() {
    }

    public static String toString(List<?> list, String separator) {
        final int size = list.size() - 1;
        if (size >= 0) {
            final StringBuilder builder = new StringBuilder();
            for (int i = 0; i < size; i++) {
                builder.append(list.get(i));
                builder.append(separator);
            }
            return builder.append(list.get(size)).toString();
        }
        return "";
    }
}

@@ -1771,11 +1771,1384 @@
 %22;%0A    %7D
+%0A%0A    public static char decodeUnicodeSequence(String source, int i) %7B%0A        // format: %5C%5CuXXXX where X is a hexadecimal digit%0A        // (starts with 1 backslash, but it needs to be escaped for this to compile)%0A        if (i + 6 %3E source.length()) %7B%0A            throw new InvalidUnicodeSequence(source.substring(i, source.length()));%0A        %7D%0A        if (source.charAt(i) != '%5C%5C' %7C%7C source.charAt(i + 1) != 'u') %7B%0A            throw new InvalidUnicodeSequence(source.substring(i, i + 6));%0A        %7D%0A        // we need to make sure the first digit isn't a sign for the next step%0A        final char firstDigit = source.charAt(i + 2);%0A        if (firstDigit == '-' %7C%7C firstDigit == '+') %7B%0A            throw new InvalidUnicodeSequence(source.substring(i, i + 6));%0A        %7D%0A        // try to parse a short and convert it to a character%0A        try %7B%0A            return (char) Short.parseShort(source.substring(i + 2, i + 6), 16);%0A        %7D catch (NumberFormatException exception) %7B%0A            throw new InvalidUnicodeSequence(source.substring(i, i + 6));%0A        %7D%0A    %7D%0A%0A    public static class InvalidUnicodeSequence extends RuntimeException %7B%0A        private static final long serialVersionUID = 1;%0A%0A        public InvalidUnicodeSequence(String sequence) %7B%0A            super(%22%5C%22%22 + sequence + %22%5C%22 is not of form %5C%5CuXXXX, where X is a hexadecimal digit%22);%0A        %7D%0A    %7D
 %0A%7D%0A

Add code to decode unicode sequences