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 122856 - Eliminate non-read/write-locked use of TokenHierarchy's methods
Summary: Eliminate non-read/write-locked use of TokenHierarchy's methods
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Miloslav Metelka
Depends on:
Reported: 2007-11-27 14:41 UTC by Miloslav Metelka
Modified: 2010-09-23 07:58 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2007-11-27 14:41:26 UTC
I'm trying to eliminate non-read/write locked access to certain TokenHierarchy's methods. Currently I use the
but as Tor and Marek suggested I will possibly migrate to do an assert for this instead of a logged exception warning.
Once implemented all the non-read/write locked accesses of TH would fail with AssertionError so I would like to
eliminate them all first. For lexer I need to fix most of the tests (relevant for other modules too imho). Although I
could make a property to ignore the locking for tests it's imo not a good practice since someone might copy code from
the tests so I would rather fix the tests.
Comment 1 Miloslav Metelka 2007-11-27 14:46:59 UTC
Some initial fixes. Owners please review whether you want a different granularity, thanks.
Checking in editor/indent/src/org/netbeans/modules/editor/indent/;
/cvs/editor/indent/src/org/netbeans/modules/editor/indent/,v  <--
new revision: 1.16; previous revision: 1.15
Checking in editor/indent/src/org/netbeans/modules/editor/indent/;
/cvs/editor/indent/src/org/netbeans/modules/editor/indent/,v  <--
new revision: 1.19; previous revision: 1.18
Checking in ruby/gsf/src/org/netbeans/modules/gsf/;
/cvs/ruby/gsf/src/org/netbeans/modules/gsf/,v  <--
new revision: 1.3; previous revision: 1.2
Checking in ruby/editing/src/org/netbeans/modules/ruby/;
/cvs/ruby/editing/src/org/netbeans/modules/ruby/,v  <--
new revision: 1.36; previous revision: 1.35
Checking in ruby/gsf/src/org/netbeans/modules/gsfret/editor/completion/;
/cvs/ruby/gsf/src/org/netbeans/modules/gsfret/editor/completion/,v  <--
new revision: 1.4; previous revision: 1.3
Checking in java/editor/src/org/netbeans/modules/editor/java/;
/cvs/java/editor/src/org/netbeans/modules/editor/java/,v  <--
new revision: 1.34; previous revision: 1.33