You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrew Cornwall (JIRA)" <ji...@apache.org> on 2008/08/04 20:54:44 UTC
[jira] Created: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
[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.
[jira] Updated: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Regis Xu updated HARMONY-5932:
------------------------------
Attachment: HARMONY-5932.diff
remove BaseRowSet.clone()
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Resolved: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu resolved HARMONY-5932.
-------------------------------
Resolution: Fixed
Applied at r687960.
Please verify if it works as you expected.
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Resolved: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu resolved HARMONY-5932.
-------------------------------
Resolution: Fixed
I have applied it in our Java6 branch.
Committed at revision r694605.
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629336#action_12629336 ]
Nathan Beyer commented on HARMONY-5932:
---------------------------------------
Log a new issue for that, as I believe this is the correct change. Even the spec for java se 6 indicates that this class doesn't implement clone [1]. The failing tests are either bad or the subclasses of BaseRowSet aren't implementing clone. This is an abstract class after all.
[1] http://java.sun.com/javase/6/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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ 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:
-----------------------------------
Hi,
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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620490#action_12620490 ]
Sean Qiu commented on HARMONY-5932:
-----------------------------------
I will apply it after our code frozen, does it make sense for you? Thanks.
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Reopened: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu reopened HARMONY-5932:
-------------------------------
When i am trying to merge update from Java 5 to Java 6.
It seems that this patch break 98 tests in sql module.
Many class will invoke this clone method.
I have remove this update from the latest merge.
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620500#action_12620500 ]
Regis Xu commented on HARMONY-5932:
-----------------------------------
Thanks Sean, that's ok for me.
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619769#action_12619769 ]
Regis Xu commented on HARMONY-5932:
-----------------------------------
Hi Andrew,
overriding the clone() method is necessary to make BaseRowSet cloneable, since Object.clone() is "protected", we should override it to be "public", that can be used by any other classes.
And I think we could remove the local variable "result" by using return super.clone(); directly if RI also did the "shallow" copy. I will check it.
> [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.
[jira] Assigned: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu reassigned HARMONY-5932:
---------------------------------
Assignee: Sean Qiu
> [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
> Assignee: Sean Qiu
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624584#action_12624584 ]
Regis Xu commented on HARMONY-5932:
-----------------------------------
Verified. Thanks Sean!
> [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
> Assignee: Sean Qiu
> Priority: Minor
> Attachments: HARMONY-5932.diff
>
>
> 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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620119#action_12620119 ]
Regis Xu commented on HARMONY-5932:
-----------------------------------
Agree.
I will create a patch for java5 soon. Since all changes of java5 will merge to java6, we can just fix it at java5.
> [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.
[jira] Commented: (HARMONY-5932) [classlib][sql] Can
BaseRowSet.clone() be removed?
Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
[ 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.