Summary: | concurrent access to HashMap | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Igor Fedorenko <igor> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | balakuma, john.arthorne, stellah, tingzhao, tjbishop |
Version: | 3.1.1 | ||
Target Milestone: | 3.2 M4 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Igor Fedorenko
2005-11-01 12:18:02 EST
*** Bug 118444 has been marked as a duplicate of this bug. *** Changed code to ensure that access to JavaModel#existingExternalFiles and JavaCModel#existingExternalConfirmedFiles is synchronized. *** Bug 119081 has been marked as a duplicate of this bug. *** I just happened to look at this. Forgive me if I am sticking my nose out here, but the meaning of the the exception has *nothing* to do with it being synchronized or not. (Although it could under some circumstances) Here is an example of the error. HashMap<String,String> m = new HashMap<String,String>() ; m.put("foo","bar") ; m.put("fu","bar") ; for(String s: m.values()) { m.clear() ; } You modified the list while you were iterating over it. That is the error. Cheers, Eric We're never removing anything from this set. We're only adding or getting. The problem could only occurred if 2 threads were adding at the same time. Synchronizing the access to this set solved the concurrency issue. Verified for 3.2 M4 using build I20051213-0010 *** Bug 190563 has been marked as a duplicate of this bug. *** Can a fix be provided for eclipse 3.0.2? (In reply to comment #8) > Can a fix be provided for eclipse 3.0.2? > This fix has already been backported in the R3_0_maintenance branch as bug 162517. |