Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 24710 invoked from network); 9 Jan 2007 13:39:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 13:39:49 -0000 Received: (qmail 41541 invoked by uid 500); 9 Jan 2007 13:39:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 41519 invoked by uid 500); 9 Jan 2007 13:39:55 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 41486 invoked by uid 99); 9 Jan 2007 13:39:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 05:39:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 05:39:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E244B7142BF for ; Tue, 9 Jan 2007 05:39:27 -0800 (PST) Message-ID: <11483123.1168349967923.JavaMail.jira@brutus> Date: Tue, 9 Jan 2007 05:39:27 -0800 (PST) From: "Alexey Petrenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2770) [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null In-Reply-To: <32439791.1166443582338.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Petrenko updated HARMONY-2770: ------------------------------------- Patch Info: [Patch Available] > [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 > Attachments: Harmony-2770-Test.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