-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b41
-
x86
-
windows_xp
Name: gm110360 Date: 02/09/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If the table header is null, JTable.updateUI() throws a
NullPointerException and fails.
I'm not sure I selected the right version on "Regression" - I can't
see the significant part of the choices on this web page (the text
is cut off). Anyway it worked in 1.4.2_03.
REGRESSION. Last worked in version tiger-beta
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expect nothing.
ACTUAL -
Get a stack dump.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at javax.swing.JTable.updateUI(JTable.java:2777)
at JTableBug2.main(JTableBug2.java:7)
Exception in thread "main"
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
class JTableBug2 {
public static void main(String[] args) {
JTable table = new JTable();
table.setTableHeader(null);
table.updateUI();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use a zero-height table header instead of null.
Release Regression From : 1.4.2_03
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 237635)
======================================================================