[
https://issues.apache.org/jira/browse/DERBY-2889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mamta A. Satoor updated DERBY-2889:
-----------------------------------
Urgency: Normal
Labels: derby_triage10_10 (was: )
> Code cleanup : remove duplicate code from TypeDescriptorImpl and
> CreateTableNode wich gets string representation of an int collation type
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2889
> URL: https://issues.apache.org/jira/browse/DERBY-2889
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.3.1.4, 10.4.1.3
> Reporter: Mamta A. Satoor
> Priority: Minor
> Labels: derby_triage10_10
>
> I have checked in following code in CreateTableNode as part of revision 552531
> + String schemaCollationName =
> + (schemaCollationType ==
> + StringDataValue.COLLATION_TYPE_UCS_BASIC ?
> + Property.UCS_BASIC_COLLATION :
> + Property.TERRITORY_BASED_COLLATION);
> Basically, the code above is trying to find the string representation for the
> int collation type so that string can be used in the exception that will be
> thrown. There is similar code to get string representation from the
> TypeDescriptor's collaiton type in TypeDescriptorImpl.java which is as
> follows
> public String getCollationName()
> {
> return(
> collationType == StringDataValue.COLLATION_TYPE_UCS_BASIC ?
> Property.UCS_BASIC_COLLATION :
> Property.TERRITORY_BASED_COLLATION);
> }
> I wonder if there is any common utility class where I can move this logic
> from TypeDescriptorImpl and CreateTableNode so the code is not duplicated.
> Please let me know if there is any recommendation for where I can move this
> code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira