1 Reply Latest reply on Sep 19, 2007 7:29 AM by Tom Baeyens

    WireContext and descriptors with no name

    porcherg Novice

      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 ?

      regards,
      Guillaume