Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 71150 invoked from network); 12 Jan 2007 18:52:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 18:52:48 -0000 Received: (qmail 72345 invoked by uid 500); 12 Jan 2007 18:52:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 72324 invoked by uid 500); 12 Jan 2007 18:52:54 -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 72314 invoked by uid 99); 12 Jan 2007 18:52:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2007 10:52:54 -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; Fri, 12 Jan 2007 10:52:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8DC2E7142D8 for ; Fri, 12 Jan 2007 10:52:27 -0800 (PST) Message-ID: <31792864.1168627947562.JavaMail.jira@brutus> Date: Fri, 12 Jan 2007 10:52:27 -0800 (PST) From: "Dmitry Irlyanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2538) [classlib][swing] javax.swing.undo.UndoManager.setLimit(int) throws unspecified ArrayIndexOutOfBoundsException In-Reply-To: <518061.1165573104651.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-2538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmitry Irlyanov updated HARMONY-2538: ------------------------------------- Attachment: H2538-UndoManager.patch > [classlib][swing] javax.swing.undo.UndoManager.setLimit(int) throws unspecified ArrayIndexOutOfBoundsException > -------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-2538 > URL: https://issues.apache.org/jira/browse/HARMONY-2538 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Denis Kishenko > Attachments: H2538-UndoManager.patch, H2538-UndoManagerTest.patch > > > There is no mention about any exception in java spec for javax.swing.undo.UndoManager.setLimit(int) > Harmony throws unspecified java.lang ArrayIndexOutOfBoundsException , but RI does not. > Test for bug reproducing: > import javax.swing.undo.*; > public class Test { > public static void main(String[] argv) { > UndoManager localUndoManager = new UndoManager(); > localUndoManager.setLimit(-5); > } > } > Output on RI: > none > Output on Harmony: > java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 8 > at java.util.Vector.elementAt(Vector.java:327) > at java.util.Vector.get(Vector.java:446) > at javax.swing.undo.UndoManager.trimEdits(UndoManager.java:163) > at javax.swing.undo.UndoManager.trimForLimit(UndoManager.java:243) > at javax.swing.undo.UndoManager.setLimit(UndoManager.java:170) -- 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