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 195209 - ISE "Annotation not added: null" from NbEditorDocument.removeAnnotation
Summary: ISE "Annotation not added: null" from NbEditorDocument.removeAnnotation
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks: 195153
  Show dependency tree
 
Reported: 2011-02-08 23:19 UTC by Jesse Glick
Modified: 2011-02-16 11:30 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 2011-02-08 23:19:25 UTC
In 110208-110c3e00ef96 (which includes faa4c323819d) I am getting repeated exceptions while editing a Java source:

WARNING [org.netbeans.modules.java.source.parsing.JavacParser]: Javac returned startpos: 2,603 > endpos: -1
SEVERE [org.openide.util.Exceptions]
java.lang.IllegalStateException: Annotation not added: null
	at org.netbeans.modules.editor.NbEditorDocument.removeAnnotation(NbEditorDocument.java:252)
	at org.openide.text.NbDocument.removeAnnotation(NbDocument.java:519)
	at org.netbeans.modules.editor.hints.AnnotationHolder$NbDocumentAttacher.detachAnnotation(AnnotationHolder.java:259)
	at org.netbeans.modules.editor.hints.AnnotationHolder.detachAnnotation(AnnotationHolder.java:225)
	at org.netbeans.modules.editor.hints.ParseErrorAnnotation.propertyChange(ParseErrorAnnotation.java:119)
	at org.openide.util.WeakListenerImpl$PropertyChange.propertyChange(WeakListenerImpl.java:196)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.editor.hints.HintsControllerImpl$CompoundLazyFixList.propertyChange(HintsControllerImpl.java:352)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.editor.hints.HintsControllerImpl$CompoundLazyFixList.propertyChange(HintsControllerImpl.java:352)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.java.hints.infrastructure.CreatorBasedLazyFixList.compute(CreatorBasedLazyFixList.java:173)
	at org.netbeans.modules.java.hints.infrastructure.LazyHintComputation.run(LazyHintComputation.java:112)
	at org.netbeans.modules.java.hints.infrastructure.LazyHintComputation.run(LazyHintComputation.java:58)
[catch] at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:322)
Comment 1 Jan Lahoda 2011-02-09 14:26:08 UTC
I did not see that myself, but I hope this might fix that:
http://hg.netbeans.org/jet-main/rev/32c605ea7182
Comment 2 Jan Lahoda 2011-02-10 09:39:15 UTC
Sorry, incorrect changeset, the correct one is:
http://hg.netbeans.org/jet-main/rev/53a177f10b78
Comment 3 Quality Engineering 2011-02-16 11:30:38 UTC
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/53a177f10b78
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #195209: change annotation type by firing an event rather than by detaching/attaching the annotation.