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:13:27 UTC

[jira] Updated: (HARMONY-2515) [classlib][swing] javax.swing.JTabbedPane.add(component, -1) throws unspecified ArrayIndexOutOfBoundsException

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

Dmitry Irlyanov updated HARMONY-2515:
-------------------------------------

    Attachment: H2515-JTabbedPane.patch

> [classlib][swing] javax.swing.JTabbedPane.add(component, -1) throws unspecified ArrayIndexOutOfBoundsException
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2515
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2515
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Attachments: H2515-JTabbedPane.patch, H2515-JTabbedPaneRTest.patch
>
>
> According to J2SE API 5.0 specifications of java.awt.Container.add(Component comp, int index) method: "Parameters: comp - the component to be added index - the position at which to insert the component, or -1 to append the component to the end ".
> Harmony throws ArrayIndexOutOfBoundsException if index == -1 while RI does not.
> Test for reproducing:
> import junit.framework.TestCase;
> import javax.swing.*;
> import java.awt.Component;
> public class Test extends TestCase {       
>     public void testcase1() {
>         JTabbedPane s = new JTabbedPane();
>         Component cmp = new JButton();
>         s.add(cmp, -1);
>     }                
> }

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