You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2013/07/12 13:07:49 UTC

[jira] [Updated] (DERBY-6296) Simplify PropertyUtil using Properties.stringPropertyNames()

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

Knut Anders Hatlen updated DERBY-6296:
--------------------------------------

    Attachment: d6296-1a.diff

Attaching d6296-1a.diff which changes PropertyUtil as suggested.

Mostly minor changes. In sortProperties(), the patch removes a good chunk of code, as we can now just call toArray() on the set instead of walking the Enumeration and managing the space in the resulting array manually.

Diffstat:

 PropertyUtil.java |   61 +++++++++++++++---------------------------------------
 1 file changed, 17 insertions(+), 44 deletions(-)

All regression tests ran cleanly with the patch.
                
> Simplify PropertyUtil using Properties.stringPropertyNames()
> ------------------------------------------------------------
>
>                 Key: DERBY-6296
>                 URL: https://issues.apache.org/jira/browse/DERBY-6296
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>         Attachments: d6296-1a.diff
>
>
> PropertyUtil should use Properties.stringPropertyNames() (new method in Java 6) instead of Properties.propertyNames() since a Set<String> view of the property names is easier to work with than an Enumeration<?>. The Set<String> view can be used with for-each loops and many of the helper methods in the standard library.

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