UCS_BASIC class, SQLChar, is doing territory based related work. It would be 
good to move this code into territry based classes.
--------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-3331
                 URL: https://issues.apache.org/jira/browse/DERBY-3331
             Project: Derby
          Issue Type: Improvement
          Components: JDBC
    Affects Versions: 10.3.2.2, 10.4.0.0
            Reporter: Mamta A. Satoor
             Fix For: 10.3.2.2, 10.4.0.0


SQLChar has a method called getCollationKey which gets called by territory 
sensitive class, WorkHorseForCollator. The code inside getCollationKey uses 
Collator to get the collation key for the string. This will never apply for 
UCS_BASIC class and hence this Collator specific code should be in territory 
sensitive classes. 

Also, getCollationKey in SQLChar uses getCollatorForCollation method to get 
access to Collator object. Because of this requirement, SQLChar has to 
implement getCollatorForCollation method which in theory will never get called 
for UCS_BASIC characters. I think all this is a cause of confusion for a future 
developer who might be looking at this code. Until the final solution is 
derived, in the interim, we should definitely atleast have an ASSERT in 
getCollatorForCollation method in SQLChar to ensure that it is never getting 
called when dealing with UCS_BASIC characters.

-- 
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