| Summary: | Detached revision not found for commit notification | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Egidijus Vaisnora <vaisegid> | ||||||||
| Component: | cdo.core | Assignee: | Egidijus Vaisnora <vaisegid> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | Flags: | stepper:
review-
|
||||||||
| Version: | 4.0 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Macintosh | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Egidijus Vaisnora
Created attachment 196129 [details]
Patch v1
After investigating code, I found line which IMO could cause this issue. Code relies, that revision will be in the cache, but cache is not responsible to provide all revisions and could be cleaned in every time.
At least after patching I don't get exception any more.
I left fetching revision from cache first, but maybe I we need to remove this code.
After investigating, I found code, which seems could cause this issue Created attachment 196200 [details]
Patch v2
I tried to consolidate the revision acquisition but I fear some tests are now failing. That may be related with revman.getRevision() returning null instead of throwing an exception if the revision could not be found. My patch makes an extra check.
Why should null be allowed there? At least it matches the behaviour of the cache that was used formerly. But also that surprises me...
Created attachment 196354 [details]
Patch v3
Patch v1 and v2 fix the NPE at the wrong place, see v3 for better fix. Committed revision 7821: - trunk/plugins/org.eclipse.emf.cdo.server Resolved Available in R20110608-1407 |