In the WireContext, descriptors are identified by their name. The name is used as the key in maps (underConstruction, underInitialization, pendingInitializations...)
In some situations, the name is not required: for example list elements don't need to have a name as they won't be fetched directly from the environment. Only the list needs to have a name.
But in this case, list elements will all be stored in "pendingInitializations" under the key "null" . As a result, only the last element will be kept in "pendingInitializations", and only the last element will be initialized.
I see several solutions to this issue:
- require a name for each descriptor
- handle the maps differently (the key won't be the name of the descriptor)
- define a default name for descriptor with no name (for example the hashCode of the object)
What do you think about this issue ? What is the best solution ?
i'll have a look and propose a fix for it.