You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dan Fabulich (JIRA)" <ji...@apache.org> on 2009/11/03 20:52:32 UTC

[jira] Commented: (DBUTILS-61) Backwards binary compatibility broken in KeyedHandler

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

Dan Fabulich commented on DBUTILS-61:
-------------------------------------

It seems that KeyedHandler was only a map of maps by convention; it was really a KeyedHandler<K,V> implements ResultSetHandler<Map<K,V>>.

But there's no way to implement that API concretely!  So I think the best thing is just to create an explicit AbstractKeyedHandler<K,V> implements ResultSetHandler<Map<K,V>>, so KeyedHandler extends AbstractKeyedHandler<Object, Map<String, Object>>.  This will also fix binary compatibility, as the compiler will append a #createRow method that returns Object.

> Backwards binary compatibility broken in KeyedHandler
> -----------------------------------------------------
>
>                 Key: DBUTILS-61
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-61
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Dan Fabulich
>             Fix For: 1.3
>
>
> In revision r832220 KeyedHandler's API was modified.  KeyedHandler#createRow used to be able to return any object, but now can only return a Map (and a map of Strings to Objects, at that).
> clirr reports this as a binary backwards compatibility error; even "correct" subclasses of KeyedHandler that attempt to override createRow will find that we ignore the subclass implementation and simply invoke KeyedHandler#createRow instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.