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 177947 - NPE from AnnotationHolder.removeUpdate
Summary: NPE from AnnotationHolder.removeUpdate
Status: RESOLVED DUPLICATE of bug 177914
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Max Sauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-01 12:55 UTC by Jesse Glick
Modified: 2009-12-01 15:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-12-01 12:55:02 UTC
Would have submitted using exception reporter, but that threw an exception too. :-(

NetBeans IDE Dev (Build 091201-0b3403056849) (#0b3403056849)

java.lang.NullPointerException
	at org.netbeans.modules.editor.hints.AnnotationHolder.removeUpdate(AnnotationHolder.java:410)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:99)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:243)
	at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1626)
	at org.netbeans.editor.BaseDocument.remove(BaseDocument.java:925)
	at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:372)
	at org.netbeans.api.java.source.ModificationResult.access$100(ModificationResult.java:85)
	at org.netbeans.api.java.source.ModificationResult$3.run(ModificationResult.java:344)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:357)
	at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:437)
	at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:354)
	at org.netbeans.api.java.source.ModificationResult.commit2(ModificationResult.java:329)
	at org.netbeans.api.java.source.ModificationResult.access$000(ModificationResult.java:85)
	at org.netbeans.api.java.source.ModificationResult$2.run(ModificationResult.java:234)
	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:327)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:411)
	at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:231)
	at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:194)
	at org.netbeans.modules.java.editor.semantic.RemoveUnusedImportFix.implement(RemoveUnusedImportFix.java:108)
[catch] at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:641)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:641)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1123)

(and then three more times).

Prevented me from deleting an unused import: accepting the hint, or simply selecting the line and hitting BACKSPACE, caused the line to be deleted momentarily but then immediately reappear. Marking P2 since it broke even "dumb" text editing.
Comment 1 Jesse Glick 2009-12-01 13:13:25 UTC
Does not seem to occur in

NetBeans IDE Dev (Build 091130-47261225e968) (#47261225e968)

so may be a regression (unless it was only happening in one IDE session for unrelated reasons).
Comment 2 Max Sauer 2009-12-01 15:01:59 UTC
Already fixed, thank you for your report anyway.

*** This bug has been marked as a duplicate of bug 177914 ***