Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 15721 invoked from network); 9 Feb 2007 12:20:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 12:20:27 -0000 Received: (qmail 59330 invoked by uid 500); 9 Feb 2007 12:20:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 59298 invoked by uid 500); 9 Feb 2007 12:20: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 59276 invoked by uid 99); 9 Feb 2007 12:20:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 04:20:33 -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, 09 Feb 2007 04:20:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F18F241095C for ; Fri, 9 Feb 2007 04:20:05 -0800 (PST) Message-ID: <12532722.1171023605987.JavaMail.jira@brutus> Date: Fri, 9 Feb 2007 04:20:05 -0800 (PST) From: "Sergey Krivenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2643) [classlib][swing] j.s.undo.UndoManager.setLimit throws ArrayIndexOutOfBoundsException In-Reply-To: <3640690.1165928067492.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-2643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471674 ] Sergey Krivenko commented on HARMONY-2643: ------------------------------------------ I can not reproduce this bug on the current build. > [classlib][swing] j.s.undo.UndoManager.setLimit throws ArrayIndexOutOfBoundsException > ------------------------------------------------------------------------------------- > > Key: HARMONY-2643 > URL: https://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. - You can reply to this email to add a comment to the issue online.