Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 68550 invoked from network); 12 Dec 2006 13:18:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2006 13:18:26 -0000 Received: (qmail 31691 invoked by uid 500); 12 Dec 2006 13:18:19 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 31433 invoked by uid 500); 12 Dec 2006 13:18:18 -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 31217 invoked by uid 99); 12 Dec 2006 13:18:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 05:18:17 -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, 12 Dec 2006 05:18:03 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7B7497142A6 for ; Tue, 12 Dec 2006 04:54:27 -0800 (PST) Message-ID: <3640690.1165928067492.JavaMail.jira@brutus> Date: Tue, 12 Dec 2006 04:54:27 -0800 (PST) From: "Alexey A. Ivanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-2643) [classlib][swing] j.s.undo.UndoManager.setLimit throws ArrayIndexOutOfBoundsException 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] j.s.undo.UndoManager.setLimit throws ArrayIndexOutOfBoundsException ------------------------------------------------------------------------------------- Key: HARMONY-2643 URL: http://issues.apache.org/jira/browse/HARMONY-2643 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Alexey A. Ivanov Priority: Minor Harmony implementation of UndoManager throws ArrayIndexOutOfBoundsException where setLimit is called with negative value. ======= code to reproduce ======= import javax.swing.undo.UndoManager; public class Test { public static void main(String[] args) { UndoManager um = new UndoManager(); um.setLimit(-1); System.out.println(um.getLimit()); System.out.println("success"); } } ======= end of code ======= ------- Harmony output ------- Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1 at java.util.Vector.elementAt(Vector.java:326) at java.util.Vector.get(Vector.java:447) at javax.swing.undo.UndoManager.trimEdits(UndoManager.java:162) at javax.swing.undo.UndoManager.trimForLimit(UndoManager.java:245) at javax.swing.undo.UndoManager.setLimit(UndoManager.java:169) at Test.main(Test.java:6) ------- end of output ------- ------- RI output ------- -1 success ------- end of output ------- -- 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