[MDSAL-375] Do not store duplicate keyed list entry fields Created: 10/Oct/18 Updated: 03/Aug/20 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Low |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As a follow-up to This means the accessor needs to be thread-safe and we need to check that all constituent fields are initialized to non-null - otherwise we need to throw an IllegalStateException. |
| Comments |
| Comment by Robert Varga [ 10/Oct/18 ] |
|
As an alternative we can continue to calculate the key eagerly, but then not generate fields for key constituents and generate their getters as forwarders, i.e. we store their values only in the key object. |
| Comment by Robert Varga [ 15/Oct/18 ] |
|
I think that is a better solution. |