db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4293) Mutable public static variables
Date Tue, 30 Jun 2009 10:15:47 GMT

    [ 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.


Mime
View raw message