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 203190 - GuardedException while introducing constant
Summary: GuardedException while introducing constant
Status: RESOLVED DUPLICATE of bug 205457
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-06 07:03 UTC by mienamoo
Modified: 2012-10-19 12:25 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 mienamoo 2011-10-06 07:03:21 UTC
NetBeans IDE 7.1 Beta (Build 201109252201)
JDK 7 build 147

I am working on a JPanel form, in source view. In the model for one of the JComboBox components of the form, I had a specific string (lets say "Item 1" for the purpose of this discussion). Elsewhere in the code I also had "Item 1", and I wanted to introduce a constant for it. I chose to replace all occurrences in the class, which would then of course include the one in the Guarded block generated by the GUI builder. The following exception occurred:

org.netbeans.editor.GuardedException: Attempt to remove from guarded block at position 19,090.
	at org.netbeans.editor.GuardedDocument.preRemoveCheck(GuardedDocument.java:288)
	at org.netbeans.editor.BaseDocument.remove(BaseDocument.java:942)
	at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:406)
	at org.netbeans.api.java.source.ModificationResult.access$100(ModificationResult.java:95)
	at org.netbeans.api.java.source.ModificationResult$3.run(ModificationResult.java:371)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:344)
	at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:448)
	at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:385)
Comment 1 Marian Mirilovic 2012-10-19 12:25:06 UTC
Without full stack-trace hard to guess, but very probably this is dup. of issue

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