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 Tue, 07 May 2013 12:09: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-11-a.diff

There are many methods with public or protected visibility that reference package-private
classes. Since calling these methods from other packages does not make much sense, they should
not be visible outside the package. derby-6169-11-a.diff reduces the visibility of some of
these methods:

- QueryTreeNode.generate()
- QueryTreeNode.getNullNode()
- ResultSetNode.bindResultColumns()
- ResultSetNode.generateNormalizationResultSet()
- ResultSetNode.generateResultSet()
- ResultSetNode.getFromTableByName()
- ValueNode.generateExpression()

As well as all methods overriding the ones mentioned above.

The patch also removes the unused ValueNode.generateFilter() method, which exposes the package-private
class ExpressionClassBuilder in its parameter list.

All the regression tests passed.
> 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:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-6169-01-a.diff, derby-6169-02-a.diff, derby-6169-03-a.diff,
derby-6169-04-a.diff, derby-6169-05-a.diff, derby-6169-06-a.diff, derby-6169-06-b.diff, derby-6169-07-a.diff,
derby-6169-08-a.diff, derby-6169-09-a.diff, derby-6169-10-a.diff, derby-6169-11-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

View raw message