harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2515) [classlib][swing] javax.swing.JTabbedPane.add(component, -1) throws unspecified ArrayIndexOutOfBoundsException
Date Thu, 07 Dec 2006 09:49:23 GMT
[classlib][swing] javax.swing.JTabbedPane.add(component, -1) throws unspecified ArrayIndexOutOfBoundsException

                 Key: HARMONY-2515
                 URL: http://issues.apache.org/jira/browse/HARMONY-2515
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Denis Kishenko

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: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message