You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/02/07 15:02:06 UTC

[jira] Resolved: (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 ]

Alexei Zakharov resolved HARMONY-2515.
--------------------------------------

    Resolution: Fixed

THanks Dmitry and Denis. The patch was applied at the revision 504549. Please check.

> [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
>         Assigned To: Alexei Zakharov
>         Attachments: H2515-JTabbedPane.patch, 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.
-
You can reply to this email to add a comment to the issue online.