JDK-6630267 : REGRESSION: javasoft.sqe.tests.api.java.awt.Container.ZOrderTests[Container0014] fail
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: OpenJDK6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-15
  • Updated: 2012-03-22
  • Resolved: 2007-11-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
OpenJDK6Resolved
Related Reports
Duplicate :  
Relates :  
Description
Due to changes made with integration of CR 4811096 (probably), the following code ( taken from JCK test javasoft.sqe.tests.api.java.awt.Container.ZOrderTests[Container0014] ) fail.

--------------------------------------
    LWComponent comp1 = new LWComponent();
    LWComponent comps[] = {
        new LWComponent(),
        new LWComponent(),
        new LWComponent()
    };
    int indices[] = { 0,1,3  };
        for (int j=0; j<indices.length; j++) {
            Container cont = new Container();
            for (int i=0; i<comps.length; i++) {
                cont.add(comps[i]);
            }
            cont.setComponentZOrder(comp1, indices[j]);
        }

--------------------------------------
The following exception is thrown:

     java.lang.ArrayIndexOutOfBoundsException: No such child: -1
         at java.awt.Container.getComponent(Container.java:307)
         at java.awt.Component.mixOnZOrderChanging(Component.java:9701)
         at java.awt.Container.setComponentZOrder(Container.java:713)
         at ZOrder.test(ZOrder.java:31)
         ...

Comments
EVALUATION The bug has been fixed in JDK7b21 (see CR 6589530). Needs to be backported to 6-open.
16-11-2007