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 230748 - Warnings from TokenHierarchyOperation when running Java hints
Summary: Warnings from TokenHierarchyOperation when running Java hints
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Linux
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2013-06-04 21:08 UTC by Jesse Glick
Modified: 2016-07-07 07:19 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 2013-06-04 21:08:47 UTC
When you run a HintTest-based test in newer NB versions you get a bunch of warnings:

… org.netbeans.lib.lexer.TokenHierarchyOperation ensureReadLocked
INFO: !!WARNING!! Missing READ-LOCK when accessing TokenHierarchy: input-source:org.openide.text.FilterDocument@134a241
java.lang.Exception
	at org.netbeans.lib.lexer.TokenHierarchyOperation.ensureReadLocked(TokenHierarchyOperation.java:397)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.isActive(TokenHierarchyOperation.java:357)
	at org.netbeans.api.lexer.TokenHierarchy.isActive(TokenHierarchy.java:356)
	at org.netbeans.modules.parsing.impl.event.EventSupport$DocListener.removeUpdate(EventSupport.java:306)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:458)
	at com.sun.proxy.$Proxy13.removeUpdate(Unknown Source)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:260)
	at javax.swing.text.AbstractDocument.handleRemove(AbstractDocument.java:623)
	at javax.swing.text.AbstractDocument$DefaultFilterBypass.remove(AbstractDocument.java:3103)
	at javax.swing.text.DocumentFilter.remove(DocumentFilter.java:79)
	at org.openide.text.CloneableEditorSupport$DocFilter.remove(CloneableEditorSupport.java:3113)
	at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:588)
	at org.openide.text.FilterDocument.remove(FilterDocument.java:119)
	at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:429)
	at org.netbeans.api.java.source.ModificationResult.access$100(ModificationResult.java:96)
	at org.netbeans.api.java.source.ModificationResult$3.run(ModificationResult.java:394)
	at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:466)
	at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:408)
	at org.netbeans.api.java.source.ModificationResult.commit2(ModificationResult.java:356)
	at org.netbeans.api.java.source.ModificationResult.access$000(ModificationResult.java:96)
	at org.netbeans.api.java.source.ModificationResult$2.run(ModificationResult.java:258)
	at org.openide.text.NbDocument.runAtomic(NbDocument.java:440)
	at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:255)
	at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:214)
	at org.netbeans.modules.java.hints.test.api.HintTest$HintWarning.doApplyFix(HintTest.java:972)
	at org.netbeans.modules.java.hints.test.api.HintTest$HintWarning.applyFix(HintTest.java:916)
	at org.netbeans.modules.java.hints.test.api.HintTest$HintWarning.applyFix(HintTest.java:906)
	at org.kohsuke.stapler.netbeans.plugin.MessagesHintTest.simpleString(MessagesHintTest.java:49)
	at …

and similarly with write locks. Appears harmless (test still passes), but quite noisy and confusing.
Comment 1 Martin Balin 2016-07-07 07:19:12 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss