Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 59138 invoked from network); 2 Jul 2007 20:34:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 20:34:27 -0000 Received: (qmail 2529 invoked by uid 500); 2 Jul 2007 20:34:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 2495 invoked by uid 500); 2 Jul 2007 20:34:28 -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 2485 invoked by uid 99); 2 Jul 2007 20:34:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 13:34:28 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 13:34:24 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 79909714191 for ; Mon, 2 Jul 2007 13:34:04 -0700 (PDT) Message-ID: <9681256.1183408444485.JavaMail.jira@brutus> Date: Mon, 2 Jul 2007 13:34:04 -0700 (PDT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2775) DataTypeDescriptor should be immutable so that multiple ValueNode referring to the same DTD do not have unexpected state changes. In-Reply-To: <3576793.1181229746392.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel John Debrunner updated DERBY-2775: ----------------------------------------- Issue Type: Improvement (was: Bug) This is code cleanup/improvement aimed at reducing potential for bugs and fixing potentially hidden bugs. > DataTypeDescriptor should be immutable so that multiple ValueNode referring to the same DTD do not have unexpected state changes. > --------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-2775 > URL: https://issues.apache.org/jira/browse/DERBY-2775 > Project: Derby > Issue Type: Improvement > Components: Services, SQL > Reporter: Daniel John Debrunner > Assignee: Daniel John Debrunner > Priority: Minor > Fix For: 10.3.1.1, 10.4.0.0 > > > I think that modifying a DTD to change its collation may be pushing the envelope of "bug-free" code. If several ValueNode's all refer to a single DTD then changing the collation of one changes all of them. This is probably not what is required. The setCollation() pattern did copy the existing setNullablity() pattern which I think is probably also wrong and subject to bugs. > Changing DTD to be (logically) immutable would be a much better solution, e.g. DTD.setNullability() returns a new DTD with the nullability set correctly, leaving the old one unmodified. (The method should also have a name change, setXXX() is wrong since it is not setting the state of the object it is called on). (Also such a method can return the same object if the state is unchanged). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.