Build: NetBeans IDE Dev (Build 091110-2ed0c0f492b5)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86
Created attachment 90984 [details]
Issue added to NetFIX Pool . Module owner please speak up if you disagree.
For NetFIX developers, the class is located in this package:
I used a lot ShowTodos module, I've never seen this exception.
From the exception stack trace, it seems that either there is no EditorCookie from the context, or ck.openDocument() is null. That seems strange.
Here is a small patch that should prevent this exception by testing the existence of an EditorCookie from the context.
Misterm, can you provide me a scenario for testing my patch ?
It was random, sorry.
Created attachment 96890 [details]
NBM package with fix
I've attached a nbm package build today with my fix, can you upgrade your version with this one (I've bumped the version, so it should install without trouble), and tell me if the exception is gone ?
Thanks for your help
Created attachment 96894 [details]
Michel, could you please review the patch and integrate it if you don't have objections? Thanks!
I will review it soon. I am glad to see patch coming for this module :)
@Michael, do you remember which kind of file was you editing in that time? :)
Author: Michel Graciano <email@example.com>
Date: 2010-04-08 11:50
Message: Bug #176777 - [68cat] NullPointerException at org.netbeans.lib.editor.util.swing.DocumentUtilities.addPriorityDocumentListener
Issue #176777 - [68cat] NullPointerException at org.netbeans.lib.editor.util.swing.DocumentUtilities.addPriorityDocumentListener
Thanks Eric for your patch. I tested it and looks ok for me. The commit was made inside the IDE and the issue update too, so the link is not correct. The correct link is http://hg.netbeans.org/main/contrib/rev/870582a9a83c
Thanks Michel for your review & integration and special thanks to Eric for the patch!
Could not reproduce anymore, seems fixed.