Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 17410 invoked from network); 30 Jun 2009 10:15:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jun 2009 10:15:59 -0000 Received: (qmail 51076 invoked by uid 500); 30 Jun 2009 10:16:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 51015 invoked by uid 500); 30 Jun 2009 10:16:09 -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 51007 invoked by uid 99); 30 Jun 2009 10:16:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 10:16:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 10:16:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 61DE4234C004 for ; Tue, 30 Jun 2009 03:15:47 -0700 (PDT) Message-ID: <695680429.1246356947393.JavaMail.jira@brutus> Date: Tue, 30 Jun 2009 03:15:47 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4293) Mutable public static variables In-Reply-To: <173705591.1246146767427.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725557#action_12725557 ] Knut Anders Hatlen commented on DERBY-4293: ------------------------------------------- derbyfinal2.patch looks like a good improvement to me. I'll run the regression tests and hopefully commit it later today. Some of the fields touched in the Configuration class don't actually seem to be in use, except in the static block that initializes them. Those are jreLevel, jreLevelMajor, jreLevelMinor, dncPackageVersion and packageNameForDNC. Do you think it would be best just to get rid of them altogether? As to the other problematic fields in Configuration, I think many of them are unused an can be removed. dncPackageConsistencyToken, which is an array, should probably be moved to NetConfiguration, in which case it could be made package-private (then it cannot be accessed by external code since the package is sealed). dncCompatibleJREVersions is another public array, but since it's only used for debugging/tracing purposes, there's probably not much harm that could be done by maliciously changing it. (The current values in dncCompatibleJREVersions are not correct, though, since the client driver no longer works with 1.3, and it does work with 1.5 and 1.6. But that's a different issue, I guess.) > Mutable public static variables > ------------------------------- > > Key: DERBY-4293 > URL: https://issues.apache.org/jira/browse/DERBY-4293 > Project: Derby > Issue Type: Improvement > Components: Build tools, Network Client, SQL, Store > Affects Versions: 10.6.0.0 > Reporter: Sebb > Attachments: derbyfinal.patch, derbyfinal2.patch > > > There are quite a few instances of public static fields which appear to be intended to be constant, but which are not final. > The code would be safer if all the constant fields were made final. > Patch to follow for some of the problem fields. > The following also ought to be fixed: > org.apache.derby.iapi.services.property.PropertyUtil.servicePropertyList (e.g. use an accessor to lookup the values) > org.apache.derby.iapi.types.JSQLType.primitiveNames (ditto) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.