You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2009/07/14 13:04:14 UTC

[jira] Closed: (WICKET-2366) Refactor: org.apache.wicket.util.string.Strings#fromEscapedUnicode(String escapedUnicodeString)

     [ https://issues.apache.org/jira/browse/WICKET-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johan Compagner closed WICKET-2366.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC8
         Assignee: Johan Compagner

> Refactor: org.apache.wicket.util.string.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-RC5, 1.4-RC6, 1.4-RC7, 1.4-RC8
>         Environment: trunk
>            Reporter: Martin Funk
>            Assignee: Johan Compagner
>             Fix For: 1.4-RC8
>
>
> 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.