harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2770) [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
Date Mon, 18 Dec 2006 12:06:22 GMT
[classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null

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

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

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: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message