commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DBUTILS-136) CaseInsensitiveHashMap cannot be accessed by subclasses of BasicRowProcessor
Date Sun, 24 Dec 2017 16:36:00 GMT

    [ https://issues.apache.org/jira/browse/DBUTILS-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302890#comment-16302890
] 

Gary Gregory commented on DBUTILS-136:
--------------------------------------

Instead of making this class public how about, adding a factory method {{createCaseInsensitiveMap(int
size))}} that returns a JRE Map?

Gary

> CaseInsensitiveHashMap cannot be accessed by subclasses of BasicRowProcessor
> ----------------------------------------------------------------------------
>
>                 Key: DBUTILS-136
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-136
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: Matthew Hall
>              Labels: easyfix, patch, usability
>
> This visibility restriction on {{CaseInsensitiveHashMap}} is too strict for no good reason:
> {{private static class CaseInsensitiveHashMap extends LinkedHashMap<String, Object>}}
> This should be specified as:
> {{protected static class CaseInsensitiveHashMap extends LinkedHashMap<String, Object>}}
> Otherwise it's painful to override or re-implement methods such as {{public Map<String,
Object> toMap(ResultSet rs) throws SQLException}}.
> Patch available at https://github.com/megahall/dbutils/tree/megahall/DBUTILS-136 .



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message