db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dag.Wan...@Sun.COM (Dag H. Wanvik)
Subject Re: [jira] Updated: (DERBY-2416) Provide a shell for a subclass of SQLChar which will use the passed Collator to do the collation rather than SQLChar's default collation of UCS_BASIC
Date Sat, 10 Mar 2007 03:15:10 GMT
"Mamta A. Satoor (JIRA)" <jira@apache.org> writes:


> I would like reviewers to take note of following comment at line 125 in the new class
> 			/* Believe it or not, a String might have more
> 			 * collation elements than characters.
> 			 * So, we handle that case by increasing the int array
> 			 * by 5 and copying array elements.
> 			 */
> Basically, when the characters in the string are converted to collation elements, one
character can get translated into say 2 collation elements (more info can be found on it in
this url http://www.developertutorials.com/tutorials/java/text-searching-java-050524/page3.html

Would it not be easier/better to just use an  ArrayList<int> to handle
any needed expansion for you (in stead of coding it yourself) and
finally do a toArray()? 

Dag

Mime
View raw message