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

[jira] Created: (HARMONY-2537) [classlib][swing] JTree.isVisible() returns false while RI returns true

[classlib][swing] JTree.isVisible() returns false while RI returns true
-----------------------------------------------------------------------

                 Key: HARMONY-2537
                 URL: http://issues.apache.org/jira/browse/HARMONY-2537
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko


According to J2SE API 5.0 specifications of isVisible(TreePath path) method: "Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false."
javax.swing.JTree.isVisible(TreePath path) returns false while RI returns true.
Compatibility issue.

Code for reproducing:
import junit.framework.TestCase;
import javax.swing.*;
import javax.swing.tree.TreePath;

public class Test extends TestCase {       
    public void testcase1() {
        TreePath p = new TreePath(new Object());
        JTree t = new JTree();
        assertTrue(t.isVisible(p));
    }
}

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

OK (1 test)

Output on Harmony:
==================
.F
Time: 1.016
There was 1 failure:
1) testcase1(Test)junit.framework.AssertionFailedError
        at Test.testcase1(Test.java:9)
        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-2537) [classlib][swing] JTree.isVisible() returns false while RI returns true

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464872 ] 

Vasily Zakharov commented on HARMONY-2537:
------------------------------------------

I'm not sure how this issue has to be addressed.
I'm giving this up hoping someone confident in Swing would look into it.


> [classlib][swing] JTree.isVisible() returns false while RI returns true
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2537
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2537
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> According to J2SE API 5.0 specifications of isVisible(TreePath path) method: "Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false."
> javax.swing.JTree.isVisible(TreePath path) returns false while RI returns true.
> Compatibility issue.
> Code for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import javax.swing.tree.TreePath;
> public class Test extends TestCase {       
>     public void testcase1() {
>         TreePath p = new TreePath(new Object());
>         JTree t = new JTree();
>         assertTrue(t.isVisible(p));
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.437
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.016
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError
>         at Test.testcase1(Test.java:9)
>         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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2537) [classlib][swing] JTree.isVisible() returns false while RI returns true

Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463582 ] 

Vasily Zakharov commented on HARMONY-2537:
------------------------------------------

I'll look into this issue.


> [classlib][swing] JTree.isVisible() returns false while RI returns true
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2537
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2537
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> According to J2SE API 5.0 specifications of isVisible(TreePath path) method: "Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false."
> javax.swing.JTree.isVisible(TreePath path) returns false while RI returns true.
> Compatibility issue.
> Code for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import javax.swing.tree.TreePath;
> public class Test extends TestCase {       
>     public void testcase1() {
>         TreePath p = new TreePath(new Object());
>         JTree t = new JTree();
>         assertTrue(t.isVisible(p));
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.437
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.016
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError
>         at Test.testcase1(Test.java:9)
>         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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2537) [classlib][swing] JTree.isVisible() returns false while RI returns true

Posted by "Alexander Simbirtsev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471302 ] 

Alexander Simbirtsev commented on HARMONY-2537:
-----------------------------------------------

I think we should reimplement this method to follow the spec:
consecutively check all nodes of the path if they are expanded up to the root.

for the nodes not belonging to the model of the tree like in this case (when we have only one node in the path) we should return 'true' to follow the RI's behavior.

> [classlib][swing] JTree.isVisible() returns false while RI returns true
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2537
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2537
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>
> According to J2SE API 5.0 specifications of isVisible(TreePath path) method: "Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false."
> javax.swing.JTree.isVisible(TreePath path) returns false while RI returns true.
> Compatibility issue.
> Code for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import javax.swing.tree.TreePath;
> public class Test extends TestCase {       
>     public void testcase1() {
>         TreePath p = new TreePath(new Object());
>         JTree t = new JTree();
>         assertTrue(t.isVisible(p));
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.437
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.016
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError
>         at Test.testcase1(Test.java:9)
>         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] Updated: (HARMONY-2537) [classlib][swing] JTree.isVisible() returns false while RI returns true

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

Alexei Zakharov updated HARMONY-2537:
-------------------------------------

    Priority: Minor  (was: Major)

> [classlib][swing] JTree.isVisible() returns false while RI returns true
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-2537
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2537
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>            Priority: Minor
>
> According to J2SE API 5.0 specifications of isVisible(TreePath path) method: "Returns true if the value identified by path is currently viewable, which means it is either the root or all of its parents are expanded. Otherwise, this method returns false."
> javax.swing.JTree.isVisible(TreePath path) returns false while RI returns true.
> Compatibility issue.
> Code for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import javax.swing.tree.TreePath;
> public class Test extends TestCase {       
>     public void testcase1() {
>         TreePath p = new TreePath(new Object());
>         JTree t = new JTree();
>         assertTrue(t.isVisible(p));
>     }
> }
> Output on Sun 1.5
> =================
> .
> Time: 0.437
> OK (1 test)
> Output on Harmony:
> ==================
> .F
> Time: 1.016
> There was 1 failure:
> 1) testcase1(Test)junit.framework.AssertionFailedError
>         at Test.testcase1(Test.java:9)
>         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.