Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 46657 invoked from network); 13 Feb 2007 08:23:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2007 08:23:28 -0000 Received: (qmail 80030 invoked by uid 500); 13 Feb 2007 08:23:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 79997 invoked by uid 500); 13 Feb 2007 08:23:34 -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 79966 invoked by uid 99); 13 Feb 2007 08:23:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2007 00:23:34 -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, 13 Feb 2007 00:23:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 61A6E714320 for ; Tue, 13 Feb 2007 00:23:06 -0800 (PST) Message-ID: <20758717.1171354986397.JavaMail.jira@brutus> Date: Tue, 13 Feb 2007 00:23:06 -0800 (PST) From: "Alexey A. Ivanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-2566) [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException In-Reply-To: <13462644.1165823661056.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-2566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey A. Ivanov closed HARMONY-2566. ------------------------------------- Verified. Thank you, Mark. > [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException > ------------------------------------------------------------------------------------------ > > Key: HARMONY-2566 > URL: https://issues.apache.org/jira/browse/HARMONY-2566 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Alexey A. Ivanov > Assigned To: Mark Hindess > Attachments: H2566-GapContent.patch, H2566-GapContentTest.patch > > > Consider the following code: > import javax.swing.text.GapContent; > public class Test { > public static void main(String[] args) { > GapContent content = new GapContent(); > try { > content.getChars(1, Integer.MAX_VALUE, null); > } catch (Exception e) { > e.printStackTrace(); > } > } > } > ------------ end of code ------------ > Running this application on Harmony produces the output: > java.lang.NullPointerException > at javax.swing.text.GapContent.getChars(GapContent.java:152) > at Test.main(Test.java:7) > ------------ end of Harmony output ------------ > Whereas RI throws BadLocationException: > javax.swing.text.BadLocationException: Invalid location > at javax.swing.text.GapContent.getChars(GapContent.java:169) > at Test.main(Test.java:7) > ------------ end of RI output ------------ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.