You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Oliver Deakin (JIRA)" <ji...@apache.org> on 2007/01/15 09:59:27 UTC

[jira] Closed: (HARMONY-2770) [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null

     [ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Deakin closed HARMONY-2770.
----------------------------------


Verified by Vasily.

> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2770
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2770
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Oliver Deakin
>         Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set". 
> Harmony returns empty array while RI returns null. 
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {   
>         public void testcase1() { 
>             DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();       
>             int [] a=t.getSelectionRows();
>             assertEquals(0, a.length); 
>         }                                                                       
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
>         at test.testcase1(test.java:9)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)

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