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.
[dev-200401181900, JDK 1.5.0 b33] NullPointerExceptions are thrown when closing java files in editor.
Created attachment 12980 [details] exc stack traces
*** Issue 39048 has been marked as a duplicate of this issue. ***
Seems like editor component can become null during kit uninstalling - strange. I'll try to fix that into 3.6.
I forgot the keyword.
*** Issue 39154 has been marked as a duplicate of this issue. ***
*** Issue 38791 has been marked as a duplicate of this issue. ***
This problem becomes more important. JDK 1.5.0 will be released soon, please take a look at it. Thanks.
*** Issue 39132 has been marked as a duplicate of this issue. ***
fixed in [maintrunk] /cvs/editor/libsrc/org/netbeans/editor/BaseCaret.java,v <-- BaseCaret.java new revision: 1.96; previous revision: 1.95 /cvs/editor/libsrc/org/netbeans/editor/BaseTextUI.java,v <-- BaseTextUI.java new revision: 1.60; previous revision: 1.59 /cvs/editor/src/org/netbeans/modules/editor/CustomizableSideBar.java,v <-- CustomizableSideBar.java new revision: 1.3; previous revision: 1.2
BTW if you figured out *why* the editor component can become null when the kit is uninstalled, you should mention that in this bug report, for historical reasons. And of course if you think that it *shouldn't* and that it is a bug in the JRE, you need to file that bug in BT and place the # here and make sure the workaround in NB is removed as soon as that bug is fixed in a public JRE release.
It became null because: there is modification of BasicTextUI.uninstallUI method. At the end there is editor=null; and this one wasn't present in jdk1.4 and before. in BaseTextUI (editor text ui representation that extends BasicTextUI) in the method BaseTextUI.uninstallUI there was at the begin of the method super.uninstallUI, which causes that editor(our component) variable became null. Later in BaseTextUI.uninstallUI was the call of getComponent() that was already null. That was incorrect behaviour in our side. The component is passed via parameter and it is not necessary to get it in other way. The JDK1.5 behaviour is right.
*** Issue 38686 has been marked as a duplicate of this issue. ***
Verified on dev-200401281900, JDK 1.5.0 b32c, b35.