harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5932) [classlib][sql] Can BaseRowSet.clone() be removed?
Date Tue, 05 Aug 2008 03:34:46 GMT

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

Regis Xu commented on HARMONY-5932:


BaseRowSet is abstract class, it's make difference, we can never call BaseRowSet.clone() directly,
 and the below test code:

public class Test {
    public static void main(String[] args) throws Exception {
        BaseRowsetImpl test = new BaseRowsetImpl();
        BaseRowsetImpl clone = (BaseRowsetImpl) test.clone();

class BaseRowsetImpl extends BaseRowSet {


will have compile error whit RI: The method clone() from the type Object is not visible

So it seems RI does nothing on the clone method

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

View raw message