| Summary: | ConcurrentModificationException during resolver fragment processing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Glyn Normington <glyn.normington> | ||||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | k2eric | ||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | 3.7.1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 353054 | ||||||||
| Attachments: |
|
||||||||
|
Description
Glyn Normington
Created attachment 200366 [details]
patch
This is a regression in 3.7.0. The move to using a Java 5 style loop over the fragments collection introduced this. In 3.6 the code used to make a copy of the array to iterate over each time to avoid the comodification error.
Should fix this regression in 3.7.1. You can still use a foreach loop over the array you create since you don't need "i" in the loop:
for (ResolverBundle remainingFrag : remainingFrags) {
Created attachment 200380 [details]
fix + modified tests
Thanks BJ, here is an updated patch + modified test to exercise this.
In testing I found an additional issue which was causing a potential for fragments to remain attached even if they should fail because of an unresolved constraint. The issue was we were not correctly indicating the reason for detaching the fragment recursively which caused us to not consolidate common imports from other attached fragments. So if more than one fragment had an import for a package that could not be resolved then we could end up with one or more of the fragments remaining attached.
Fix released to R3_7_maintenance with commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?h=R3_7_maintenance&id=c6d28eb803d47215fb0e5b6a0787ab407f83cd5a released to Juno (master with commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=f2bb8d0b941fc6c3b9c2c43f1df73ebd2f3048ca |