| Summary: | multiple attempts at locking a Location cause release not to work | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Thomas Watson <tjwatson> | ||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jeffmcaffer, pradeepb, simon_kaegi | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | 3.5 M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Thomas Watson
Created attachment 121977 [details]
proposed fix
The fix is to check if the Location is locked before attempt to lock the location.
Good catch. I would have run into this yesterday when I added similar tests in the ProfileRegistryTest for in-process locking via same thread (as part of bug 257654), but I didn't exercise this case, as there I needed different semantics - the second call to lock() to return true as I know for sure it is from the same thread (which is the existing behavior). So I ended up short-circuiting it in the local lock() method (that internally calls Location.lock()). In this case it is fine as there was one more layer that blocks it if the request was from a different thread. Wow that's brutal. We might want to consider back-porting the fix. +1 to the patch and tests This bug has been around since 3.0. I am reluctant to backport to 3.4.2 given how late we are in the cycle. Jeff, thoughts? Patch released to HEAD. |