Bug 122856 - Eliminate non-read/write-locked use of TokenHierarchy's methods
Summary: Eliminate non-read/write-locked use of TokenHierarchy's methods
Status: STARTED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
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:


Attachments

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
-J-Dorg.netbeans.lib.lexer.TokenHierarchyUpdate.level=FINE
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/IndentImpl.java;
/cvs/editor/indent/src/org/netbeans/modules/editor/indent/IndentImpl.java,v  <--  IndentImpl.java
new revision: 1.16; previous revision: 1.15
done
Checking in editor/indent/src/org/netbeans/modules/editor/indent/TaskHandler.java;
/cvs/editor/indent/src/org/netbeans/modules/editor/indent/TaskHandler.java,v  <--  TaskHandler.java
new revision: 1.19; previous revision: 1.18
done
Checking in ruby/gsf/src/org/netbeans/modules/gsf/AbstractCamelCasePosition.java;
/cvs/ruby/gsf/src/org/netbeans/modules/gsf/AbstractCamelCasePosition.java,v  <--  AbstractCamelCasePosition.java
new revision: 1.3; previous revision: 1.2
done
Checking in ruby/editing/src/org/netbeans/modules/ruby/CodeCompleter.java;
/cvs/ruby/editing/src/org/netbeans/modules/ruby/CodeCompleter.java,v  <--  CodeCompleter.java
new revision: 1.36; previous revision: 1.35
done
Checking in ruby/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionProvider.java;
/cvs/ruby/gsf/src/org/netbeans/modules/gsfret/editor/completion/GsfCompletionProvider.java,v  <-- 
GsfCompletionProvider.java
new revision: 1.4; previous revision: 1.3
done
Checking in java/editor/src/org/netbeans/modules/editor/java/Utilities.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/Utilities.java,v  <--  Utilities.java
new revision: 1.34; previous revision: 1.33