harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2643) [classlib][swing] j.s.undo.UndoManager.setLimit throws ArrayIndexOutOfBoundsException
Date Tue, 17 Apr 2007 12:36:15 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey A. Ivanov closed HARMONY-2643.
-------------------------------------

    Resolution: Duplicate

> [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.


Mime
View raw message