harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5932) [classlib][sql] Can BaseRowSet.clone() be removed?
Date Wed, 06 Aug 2008 01:08:44 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620105#action_12620105
] 

Nathan Beyer commented on HARMONY-5932:
---------------------------------------

Regarding the initial comment - that's exactly how clone method is implemented; you implement
Cloneable and create a public clone method.

In this case, it looks like BaseRowSet has a bug and the spec does say it implements Cloneable,
but doesn't properly define the clone method [1]. The same issue is in Java SE 6 spec. As
such, I think we should remove it as well.

Note - most code would never use BaseRowSet, they'd use the various RowSet interfaces, so
I'm guessing this just never came up.


[1] http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/BaseRowSet.html

> [classlib][sql] Can BaseRowSet.clone() be removed?
> --------------------------------------------------
>
>                 Key: HARMONY-5932
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5932
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M6
>         Environment: All SQL M6
>            Reporter: Andrew Cornwall
>            Priority: Minor
>
> The class BaseRowSet has an implementation of clone() which does the following:
>     public BaseRowSet clone() throws CloneNotSupportedException{
>         BaseRowSet result = (BaseRowSet) super.clone();        
>         return result;
>         
>     }
> Is there any reason this method can't be removed so BaseRowSet inherits Object.clone()
instead? The spec explicitly says clone() is inherited from Object, so the cast to BaseRowSet
seems unnecessary.

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


Mime
View raw message