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-5143) Remove unnecessary copying of the map in getTypeMap()
Date Mon, 21 Mar 2011 12:11:05 GMT

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

Knut Anders Hatlen updated DERBY-5143:
--------------------------------------

    Attachment: derby-5143-1a.diff

Attaching a new patch (derby-5143-1a.diff) with the following changes from the initial patch:

- simplified the getTypeMap() overrides a little more

- made the client implementation return EMPTY_MAP (immutable) instead of an empty HashMap
(mutable), to match the embedded implementation

- updated ConnectionTest to expect the returned map to be immutable

> Remove unnecessary copying of the map in getTypeMap()
> -----------------------------------------------------
>
>                 Key: DERBY-5143
>                 URL: https://issues.apache.org/jira/browse/DERBY-5143
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.8.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-5143-1a.diff, getTypeMap-warning.diff
>
>
> The JDBC 4.0 Connection classes implement getTypeMap() by calling super.getTypeMap()
and copying the resulting map. This is done to prevent an unchecked compiler warning that
we would see if we simply returned super.getTypeMap() in this method. It would be cheaper
and simpler to return super.getTypeMap() and ignore the warning.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message