[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:
Blocks
is blocked by MDSAL-374 Keyed list entry builders' copy const... Resolved

 Description   

As a follow-up to MDSAL-374, make sure we do not instantiate the entry key eagerly, but rather postpone its instantiation to when it is actually requested.

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.

Generated at Wed Feb 07 20:09:39 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.