Refactor: Strings#fromEscapedUnicode(String escapedUnicodeString)
-----------------------------------------------------------------

                 Key: WICKET-2366
                 URL: https://issues.apache.org/jira/browse/WICKET-2366
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.4-RC7, 1.4-RC6, 1.4-RC5, 1.4-RC8
         Environment: trunk
            Reporter: Martin Funk


trying to understand the code I failed to see in which case the first two if 
statments hold true.
this smells so bad, I didn't check beyond.

        public static String fromEscapedUnicode(String escapedUnicodeString)
        {
                int off = 0;
                char[] in = escapedUnicodeString.toCharArray();
                int len = in.length;
                char[] convtBuf = new char[len];

                if (convtBuf.length < len)
                {
                        int newLen = len * 2;
                        if (newLen < 0)
                        {
                                newLen = Integer.MAX_VALUE;
                        }
                        convtBuf = new char[newLen];
                }
[...]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to