Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 61029 invoked from network); 5 Dec 2006 12:41:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2006 12:41:43 -0000 Received: (qmail 15173 invoked by uid 500); 5 Dec 2006 12:41:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 15081 invoked by uid 500); 5 Dec 2006 12:41:51 -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 15072 invoked by uid 99); 5 Dec 2006 12:41:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Dec 2006 04:41:51 -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, 05 Dec 2006 04:41:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 216457142BF for ; Tue, 5 Dec 2006 04:41:22 -0800 (PST) Message-ID: <21901640.1165322482132.JavaMail.jira@brutus> Date: Tue, 5 Dec 2006 04:41:22 -0800 (PST) From: "Sergey Krivenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-2459) [classlib] [swing] Method replace() in class AbstractDocument$BranchElement throws NegativeArraySizeException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib] [swing] Method replace() in class AbstractDocument$BranchElement throws NegativeArraySizeException -------------------------------------------------------------------------------------------------------------- Key: HARMONY-2459 URL: http://issues.apache.org/jira/browse/HARMONY-2459 Project: Harmony Issue Type: Bug Components: Classlib Environment: WIN XP Reporter: Sergey Krivenko The following code throws ArrayIndexOutOfBoundsException on RI but NegativeArraySizeException on Harmony: import javax.swing.text.AbstractDocument; import javax.swing.text.AttributeSet; import javax.swing.text.DefaultStyledDocument; import javax.swing.text.Document; import javax.swing.text.Element; import javax.swing.text.StyleContext; public class Test { public Test() { DefaultStyledDocument localDefaultStyledDocument = new DefaultStyledDocument(new StyleContext()); AbstractDocument.BranchElement localAbstractDocument$BranchElement = localDefaultStyledDocument.new BranchElement(new testElement(), (AttributeSet) null); try { int returnValue = localAbstractDocument$BranchElement .getElementIndex(0); System.out.println("returnValue= " + returnValue); } catch(Exception e) { e.printStackTrace(); } } public static void main(String[] args) { new Test(); } class testElement implements Element { public AttributeSet getAttributes() { return null; } public Document getDocument() { return null; } public Element getElement(int p0) { return null; } public int getElementCount() { return 0; } public int getElementIndex(int p0) { return 0; } public int getEndOffset() { return 0; } public String getName() { return "AA"; } public Element getParentElement() { return null; } public int getStartOffset() { return 0; } public boolean isLeaf() { return false; } } } -- 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