JDK-6426366 : REGRESSION: JTabbedPane crashes when there are no opened tabs
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-05-16
  • Updated: 2010-04-04
  • Resolved: 2006-07-24
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b84)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b84, mixed mode, sharing)

A DESCRIPTION OF THE PROBLEM :
IntelliJ IDEA run with Mustang b84.
When closing the last editor I get:

0 >= 0
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
	at java.util.Vector.elementAt(Vector.java:431)
	at javax.swing.JTabbedPane.getComponentAt(JTabbedPane.java:1201)
	at javax.swing.JTabbedPane.getSelectedComponent(JTabbedPane.java:637)
	at com.intellij.ui.TabbedPaneWrapper
          ..........

Clearly getSelectedComponent() should return null when there are zro components, rather than crashing.

This is a regression since 5.0 release.


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : mustang
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Comments
EVALUATION This is a duplicate of 6420152. They resulted from the same cause and I've confirmed that this will be resolved with the fix to that bug.
24-07-2006

EVALUATION DELETED ENTRY
13-06-2006