You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry Irlyanov (JIRA)" <ji...@apache.org> on 2007/01/12 19:52:27 UTC

[jira] Updated: (HARMONY-2538) [classlib][swing] javax.swing.undo.UndoManager.setLimit(int) throws unspecified ArrayIndexOutOfBoundsException

     [ 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