| Summary: | CDOClassInfoImpl broken for EClasses with transient features | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Caspar D. <caspar_d> | ||||||||
| Component: | cdo.core | Assignee: | Caspar D. <caspar_d> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | saulius.tvarijonas | ||||||||
| Version: | 4.0 | Flags: | stepper:
review+
|
||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Caspar D.
Created attachment 187829 [details]
Patch (including testcase)
(In reply to comment #0) > The length of the array must be equal to > the number of ALL features, not just the persistent > features, and it should be Right... I see I left off in mid-sentence. Well, what I meant was: ... it should be initialized with some marker values so that unmapped features can be recognized. After weighing many, many options, such as -29, -11, -43, and other prime numbers, I decided that the marker value shall be.......... -1 !!! See patch, & have a good weekend. Created attachment 187838 [details]
Enables EMF notifications on transaction.rollback()
Updated patch (187818).
Does now only a single load revision call to the server.
I confirm to
1) The number of lines that you changed is smaller than 250.
2) You are the only author of these changed lines.
3) You apply the EPL to these changed lines.
(In reply to comment #2) > After weighing many, many options, such as -29, -11, > -43, Primes are over-appreciated, why not -42 ?! :P Created attachment 187909 [details]
Patch v2 - ready to be committed
Just some minor changes:
I introduced a symbolic constant for the marker: int NOT_MAPPED = -1
I changed the exception message: "Feature not mapped: " + getEClass().getEStructuralFeature(featureID)
I changed the array initialization: Arrays.fill(featureIDMappings, NOT_MAPPED)
(In reply to comment #5) > I changed the array initialization: Arrays.fill(featureIDMappings, NOT_MAPPED) Amazing, I was wondering whether Java had something like that :-) Committed to trunk, r. 6982. Available in R20110608-1407 |