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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org
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.

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org

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

Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Dan Fabulich closed DBUTILS-61.
-------------------------------

    Resolution: Fixed

Fixed revision 832529.

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