Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 54072 invoked from network); 11 Jan 2007 17:26:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2007 17:26:49 -0000 Received: (qmail 24621 invoked by uid 500); 11 Jan 2007 17:26:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 24591 invoked by uid 500); 11 Jan 2007 17:26: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 24582 invoked by uid 99); 11 Jan 2007 17:26:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 09:26: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; Thu, 11 Jan 2007 09:26:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D30A07142F7 for ; Thu, 11 Jan 2007 09:26:27 -0800 (PST) Message-ID: <19458313.1168536387861.JavaMail.jira@brutus> Date: Thu, 11 Jan 2007 09:26:27 -0800 (PST) From: "Vasily Zakharov (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 ] Vasily Zakharov updated HARMONY-2770: ------------------------------------- Attachment: Harmony-2770-Test.patch Harmony-2770.patch > [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