Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 865F04C41 for ; Wed, 11 May 2011 22:57:27 +0000 (UTC) Received: (qmail 79654 invoked by uid 500); 11 May 2011 22:57:27 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 79639 invoked by uid 500); 11 May 2011 22:57:27 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 79628 invoked by uid 99); 11 May 2011 22:57:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 22:57:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 22:57:26 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 83CD38222F for ; Wed, 11 May 2011 22:56:47 +0000 (UTC) Date: Wed, 11 May 2011 22:56:47 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: <319813800.5262.1305154607536.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <654799318.555.1305046727366.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-5224) [patch] reduce cohesion by removing overzealous casting MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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( C_NodeTypes.ROW_COUNT_NODE, prnRSN, topList, offset, fetchFirst, getContextManager()); 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