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 208490 - Multiple modification tasks may incorrectly share the same ElementOverlay
Summary: Multiple modification tasks may incorrectly share the same ElementOverlay
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 09:53 UTC by Ralph Ruijs
Modified: 2012-04-03 11:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Result of some debugging. (6.23 KB, patch)
2012-02-16 10:21 UTC, Ralph Ruijs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Ruijs 2012-02-16 09:53:37 UTC
The ElementOverlay is currently stored in the javac's context when running modification task for the first time, but not when subsequent modification tasks are running over the same javac. As ImportAnalysis2 uses the value from the javac's context, while WorkingCopy is registering classes into an ElementOverlay created for that particular modification task. This leads to incorrect import resolution as the import analysis is not seeing the classes newly created in the current modification task.
Comment 1 Ralph Ruijs 2012-02-16 10:21:15 UTC
Created attachment 115798 [details]
Result of some debugging.
Comment 2 Jan Lahoda 2012-04-02 09:34:24 UTC
http://hg.netbeans.org/jet-main/rev/b1f8e0d263cc
Comment 3 Quality Engineering 2012-04-03 11:11:40 UTC
Integrated into 'main-golden', will be available in build *201204030400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b1f8e0d263cc
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #208490: must consistently use the current ElementOverlay.