-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2
-
b01
-
x86
-
windows_2000
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2210707 | 7u2 | Pavel Porvatov | P3 | Closed | Fixed | b03 |
Name: jk109818 Date: 08/19/2003
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
WindowsTreeUI.ensureRowsAreVisible remembers to check for getPathBounds returning null in the 1st half of the method, but forgets to check for it in the 2nd half of the method.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just looking at the WindowsTreeUI.ensureRowsAreVisible shows why this problem is occuring, simply checking for testRect == null like the same method already does with scrollBounds will fix the problem, hence I am not providing a test case.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no exception
ACTUAL -
NullPointerException
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
at com.sun.java.swing.plaf.windows.WindowsTreeUI.ensureRowsAreVisible(WindowsTreeUI.java:91)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2099)
at javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2082)
at javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2036)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2831)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mouseReleased(BasicTreeUI.java:2864)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
REPRODUCIBILITY :
This bug can be reproduced occasionally.
---------- BEGIN SOURCE ----------
See steps to reproduce.
---------- END SOURCE ----------
(Incident Review ID: 191525)
======================================================================
- backported by
-
JDK-2210707 WindowsTreeUI can cause NullPointerException occasionally
-
- Closed
-
- relates to
-
JDK-6505523 NullPointerException in BasicTreeUI when a node is removed by expansion listener
-
- Resolved
-
-
JDK-8004298 NPE in WindowsTreeUI.ensureRowsAreVisible
-
- Resolved
-