This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222081 - NullPointerException at javax.swing.plaf.basic.BasicTreeUI$Actions.page
Summary: NullPointerException at javax.swing.plaf.basic.BasicTreeUI$Actions.page
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: JDK Problems (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL: http://bugs.sun.com/bugdatabase/view_...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 01:36 UTC by _ gtzabari
Modified: 2012-12-03 14:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 195097


Attachments
stacktrace (2.90 KB, text/plain)
2012-11-14 01:36 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2012-11-14 01:36:08 UTC
Build: NetBeans IDE Dev (Build 201211060001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

Stacktrace: 
java.lang.NullPointerException
   at javax.swing.plaf.basic.BasicTreeUI$Actions.page(BasicTreeUI.java:4470)
   at javax.swing.plaf.basic.BasicTreeUI$Actions.actionPerformed(BasicTreeUI.java:4046)
   at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
   at javax.swing.JComponent.processKeyBinding(JComponent.java:2879)
   at javax.swing.JComponent.processKeyBindings(JComponent.java:2926)
   at javax.swing.JComponent.processKeyEvent(JComponent.java:2842)
Comment 1 _ gtzabari 2012-11-14 01:36:10 UTC
Created attachment 127752 [details]
stacktrace
Comment 2 Jaroslav Tulach 2012-11-15 15:47:14 UTC
What is on line BasicTreeUI.java:4470? Look at 
http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/file/jdk7u9-b05/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
it seems there is:


     4468                 Rectangle            newRect = ui.getPathBounds(tree, newPath);
     4469 
     4470                 newRect.x = visRect.x;
     4471                 newRect.width = visRect.width;
     4472                 if(direction == -1) {
     4473                     newRect.height = visRect.height;

The simplest fix would be to modify 4470 to:

if (newRect == null) return;
Comment 3 Jaroslav Tulach 2012-11-21 09:10:48 UTC
Possible fix of the NPE in OpenJDK is being discussed at
http://mail.openjdk.java.net/pipermail/swing-dev/2012-November/002382.html