db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5224) [patch] reduce cohesion by removing overzealous casting
Date Wed, 11 May 2011 22:56:47 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032155#comment-13032155

Dag H. Wanvik commented on DERBY-5224:

I am not sure this change is always "in tune" with the current idioms we employ. For example,
when allocating compiler nodes using the factory method, e.g.

prnRSN = (RowCountNode)getNodeFactory().getNode(

the pattern has always been to cast to the class corresponding to the nodetype, i.e. ROW_COUNT_NODE,
although we don't not always need the specialized node version at the point where it is being
created. Perhaps it would be beneficial to stick to this established pattern to avoid introducing
errors? I don't see the need to change this a priori?

> [patch] reduce cohesion by removing overzealous casting
> -------------------------------------------------------
>                 Key: DERBY-5224
>                 URL: https://issues.apache.org/jira/browse/DERBY-5224
>             Project: Derby
>          Issue Type: Improvement
>            Reporter: Dave Brosius
>            Priority: Trivial
>         Attachments: reduce_cohesion.diff
> various spots casts assignments to a type more restrictive than needed, increasing cohesion.
Patch reduces the casting to the required types.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message