-
Bug
-
Resolution: Fixed
-
P1
-
6u3
-
b20
-
x86
-
windows_vista
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2150913 | 6u4 | Igor Kushnirskiy | P1 | Resolved | Fixed | b02 |
NPE thrown in DefaultTableCellHeaderRenderer while lauching the test in 6u3_b01.
It is working fine with 6u2_b05 and jdk7b15. This is a regression due to fix for 6434444.
This is happening on Vista (Ultimate as well as Enterprise) with default theme.
JDK Info:
=========
java version "1.6.0_03-ea"
Java(TM) SE Runtime Environment (build 1.6.0_03-ea-b01)
Java HotSpot(TM) Client VM (build 1.6.0_03-ea-b01, mixed mode, sharing)
A simple JTable with string data and column names set to its headers, throws an NPE(stack trace attached).
Steps to reproduce:
1)Run the attached test case with 6u3_b01.
THe UI does not come up and the below exception occurs.
--------------Exception---------------
Z:\disk11\swing\tmp>c:\jdk1.6.0_03\bin\java -Dswing.defaultlaf=com.sun.java.swin
g.plaf.windows.WindowsLookAndFeel TableSamples
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:997)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323)
at TableSamples.main(TableSamples.java:14)
Caused by: java.lang.NullPointerException
at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(DefaultTableCellHeaderRenderer.java:104)
at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(WindowsTableHeaderUI.java:108)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:657)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableHeaderUI.java:692)
at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTableHeaderUI.java:721)
at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:752)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78
)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:70
2)
at java.awt.Container.layout(Container.java:1432)
at java.awt.Container.doLayout(Container.java:1421)
at java.awt.Container.validateTree(Container.java:1519)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validate(Container.java:1491)
at java.awt.Window.show(Window.java:825)
at java.awt.Component.show(Component.java:1422)
at java.awt.Component.setVisible(Component.java:1375)
at java.awt.Window.setVisible(Window.java:806)
at TableSamples.createAndShowGUI(TableSamples.java:45)
at TableSamples.<init>(TableSamples.java:29)
at TableSamples$1.run(TableSamples.java:18)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(DefaultTableCellHeaderRenderer.java:104)
at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(WindowsTableHeaderUI.java:108)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:657)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableHeaderUI.java:692)
at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTableHeaderUI.java:721)
at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:752)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702)
at java.awt.Container.layout(Container.java:1432)
at java.awt.Container.doLayout(Container.java:1421)
at java.awt.Container.validateTree(Container.java:1519)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validate(Container.java:1491)
at java.awt.Window.dispatchEventImpl(Window.java:2438)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
--------------Exception---------------
If I uncomment the line table.setAutoCreateRowSorter(true) , the exception does not occur any more.
It is working fine with 6u2_b05 and jdk7b15. This is a regression due to fix for 6434444.
This is happening on Vista (Ultimate as well as Enterprise) with default theme.
JDK Info:
=========
java version "1.6.0_03-ea"
Java(TM) SE Runtime Environment (build 1.6.0_03-ea-b01)
Java HotSpot(TM) Client VM (build 1.6.0_03-ea-b01, mixed mode, sharing)
A simple JTable with string data and column names set to its headers, throws an NPE(stack trace attached).
Steps to reproduce:
1)Run the attached test case with 6u3_b01.
THe UI does not come up and the below exception occurs.
--------------Exception---------------
Z:\disk11\swing\tmp>c:\jdk1.6.0_03\bin\java -Dswing.defaultlaf=com.sun.java.swin
g.plaf.windows.WindowsLookAndFeel TableSamples
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:997)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1323)
at TableSamples.main(TableSamples.java:14)
Caused by: java.lang.NullPointerException
at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(DefaultTableCellHeaderRenderer.java:104)
at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(WindowsTableHeaderUI.java:108)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:657)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableHeaderUI.java:692)
at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTableHeaderUI.java:721)
at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:752)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78
)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:70
2)
at java.awt.Container.layout(Container.java:1432)
at java.awt.Container.doLayout(Container.java:1421)
at java.awt.Container.validateTree(Container.java:1519)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validate(Container.java:1491)
at java.awt.Window.show(Window.java:825)
at java.awt.Component.show(Component.java:1422)
at java.awt.Component.setVisible(Component.java:1375)
at java.awt.Window.setVisible(Window.java:806)
at TableSamples.createAndShowGUI(TableSamples.java:45)
at TableSamples.<init>(TableSamples.java:29)
at TableSamples$1.run(TableSamples.java:18)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.swing.table.DefaultTableCellHeaderRenderer.getColumnSortOrder(DefaultTableCellHeaderRenderer.java:104)
at com.sun.java.swing.plaf.windows.WindowsTableHeaderUI$XPDefaultRenderer.getTableCellRendererComponent(WindowsTableHeaderUI.java:108)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderRenderer(BasicTableHeaderUI.java:657)
at javax.swing.plaf.basic.BasicTableHeaderUI.getHeaderHeight(BasicTableHeaderUI.java:692)
at javax.swing.plaf.basic.BasicTableHeaderUI.createHeaderSize(BasicTableHeaderUI.java:721)
at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:752)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78)
at java.awt.Container.preferredSize(Container.java:1616)
at java.awt.Container.getPreferredSize(Container.java:1601)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702)
at java.awt.Container.layout(Container.java:1432)
at java.awt.Container.doLayout(Container.java:1421)
at java.awt.Container.validateTree(Container.java:1519)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validateTree(Container.java:1526)
at java.awt.Container.validate(Container.java:1491)
at java.awt.Window.dispatchEventImpl(Window.java:2438)
at java.awt.Component.dispatchEvent(Component.java:4243)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
--------------Exception---------------
If I uncomment the line table.setAutoCreateRowSorter(true) , the exception does not occur any more.
- backported by
-
JDK-2150913 REGRESSION:NPE in DefaultTableCellHeaderRenderer in 6u3_b01 due to fix for 6434444
- Resolved
- duplicates
-
JDK-6580870 add_fcs_entry fails with 6.0u3eab01 but passes with 6.0u2fcs & 6.0u1fcs on vista
- Closed
-
JDK-6580886 CertFingerprintSupportJcpl fails with 6.0u3eab01 but passes with 6.0u2fcs & 6.0u1fcs on vista
- Closed
-
JDK-6580921 JavaRuntimeSetparams fails with 6.0u3eab01 but passes with 6.0u2fcs & 6.0u1fcs on vista
- Closed
- relates to
-
JDK-6434444 Vista: JTable differs with native table in vista laf.
- Closed