You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Artem Aliev (JIRA)" <ji...@apache.org> on 2006/12/04 13:53:21 UTC

[jira] Created: (HARMONY-2419) [swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

[swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
-------------------------------------------------------------------------------

                 Key: HARMONY-2419
                 URL: http://issues.apache.org/jira/browse/HARMONY-2419
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Artem Aliev


According to J2SE API 5.0 specifications of
DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
the new node has no parent or children and has a reference to the same user
object, if any."
javax.swing.JTree.DynamicUtilTreeNode.clone() returns
javax.swing.tree.DefaultMutableTreeNode object while RI returns
JTree.DynamicUtilTreeNode.

Test for reprodicing:
import junit.framework.TestCase;
import javax.swing.*;

public class Test extends TestCase {       
    public void testcase1() {
        Object obj = new Object();
        JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
        Object cl = t.clone();
        assertEquals(t.getClass(), cl.getClass());
    }
}

Output on Sun 1.5
=================
.
Time: 0.219

OK (1 test)

Output on Harmony:
==================
.F
Time: 1.234
There was 1 failure:
1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
x.swing.tree.DefaultMutableTreeNode>
        at Test.testcase1(Test.java:10)
        at java.lang.reflect.VMReflection.invokeMethod(Native Method)

FAILURES!!!
Tests run: 1,  Failures: 1,  Errors: 0


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2419?page=all ]

Paulex Yang updated HARMONY-2419:
---------------------------------

    Summary: [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object  (was: [swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object)

> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877479#action_12877479 ] 

Hudson commented on HARMONY-2419:
---------------------------------

Integrated in Harmony-1.5-head-linux-x86_64 #840 (See [http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/840/])
    Apply fix for HARMONY-2419 ([classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object)


> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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


[jira] Commented: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877489#action_12877489 ] 

Hudson commented on HARMONY-2419:
---------------------------------

Integrated in Harmony-select-1.5-head-linux-x86_64 #28 (See [http://hudson.zones.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/28/])
    Apply fix for HARMONY-2419 ([classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object)


> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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


[jira] Commented: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876502#action_12876502 ] 

Sebb commented on HARMONY-2419:
-------------------------------

The problem here is that the clone() method fails to call super.clone(), so subclasses don't have the correct class.

> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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


[jira] Assigned: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-2419:
------------------------------------

    Assignee: Tim Ellison

> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Tim Ellison
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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


[jira] Closed: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-2419.
--------------------------------


> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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


[jira] Resolved: (HARMONY-2419) [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-2419.
----------------------------------

    Fix Version/s: 5.0M15
       Resolution: Fixed

Fixed in Swing module at repo revision r953360.

This has been open so long that I'm guessing Artem is no longer monitoring it.  I'll close the defect and anyone can reopen it if required.



> [classlib][swing] JTree.DynamicUtilTreeNode.clone() returns DefaultMutableTreeNode object
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2419
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2419
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Tim Ellison
>             Fix For: 5.0M15
>
>
> According to J2SE API 5.0 specifications of
> DefaultMutableTreeNode.clone() method: "Returns a shallow copy of this node;
> the new node has no parent or children and has a reference to the same user
> object, if any."
> javax.swing.JTree.DynamicUtilTreeNode.clone() returns
> javax.swing.tree.DefaultMutableTreeNode object while RI returns
> JTree.DynamicUtilTreeNode.
> Test for reprodicing:
> import junit.framework.TestCase;
> import javax.swing.*;
> public class Test extends TestCase {       
>     public void testcase1() {
>         Object obj = new Object();
>         JTree.DynamicUtilTreeNode t = new JTree.DynamicUtilTreeNode(obj,obj);
>         Object cl = t.clone();
>         assertEquals(t.getClass(), cl.getClass());
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.219
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.234
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError: expected:<class
> javax.swing.JTree$DynamicUtilTreeNode> but was:<class java
> x.swing.tree.DefaultMutableTreeNode>
>         at Test.testcase1(Test.java:10)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

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