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] [Updated] (DERBY-6169) Reduce visibility of classes and methods under impl/sql
Date Fri, 12 Apr 2013 12:04:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-6169:
--------------------------------------

    Attachment: derby-6169-02-a.diff

Patch derby-6169-02-a.diff silences some warnings under impl/sql/compile.

- It reduces the visibility of some classes, fields and methods that are only accessed from
within the same package.

- It removes some unused methods. One of the removed methods, ConstraintDefinitionNode.setCheckColumnReferences(int[])
is actually called once, but the variable it sets is never used, so I removed both the method
and the call to it.

- UnaryOperatorNode's init() method was changed to expect a scalar rather than an array in
the third parameter. FindBugs didn't quite like the possibility of setting an array field
directly via a public method and warned about this (because arrays are mutable). The array
always contained a single element, so it could just as well be a scalar.

All the regression tests ran cleanly with the patch.
                
> Reduce visibility of classes and methods under impl/sql
> -------------------------------------------------------
>
>                 Key: DERBY-6169
>                 URL: https://issues.apache.org/jira/browse/DERBY-6169
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-6169-01-a.diff, derby-6169-02-a.diff
>
>
> My IDE shows many warnings in the classes under impl/sql because they are public and
may make parts of the internal state more visible than necessary. I'd like to reduce the visibility
of classes and methods, if possible, to make it clearer to IDEs and tools that perform static
analysis that the code is only accessed from the same package, and reduce some of the noise
from the tools.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message