Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #60 (closed)

Opened 14 years ago

Closed 14 years ago

addLink creates a new Set for unloaded collections.

Reported by: jamoore Owned by: jamoore
Priority: critical Cc: cxallan
Sprint: n.a.
Total Remaining Time: n.a.


If a collection is unloaded ( Object.typeLinks ) and a new item is linked (e.g.
Project.addDataset( dataset ) ), then the addTYPE method initializes the
typeLinks set to new HashSet?();

This will thoroughly confuse the backend.

This needs to either:

  1. Throw an exception.
  2. Intialize the field and set it to "filtered". The backend will need to be changed to find the new member.

In resurrect, this was leading to the "only one addable user" bug. Basically doing,

 for ( User user : users ) 
   group = server.getGroup()
   user.linkGroup( group ) user )

would only store the last user, because the serialized version of group from the
server had a nulled out users (Experimenters) java.util.Set.

Originally :

Change History (1)

comment:1 Changed 14 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

r662 removed the problem spots, basically calls of the form:

    if ( set == null )
       set = new HashSet();
    modifySet( set );

are now:

    if ( set == null )
      throw new ApiUsageException("Please update");

    modifySet( set );

This will most certainly cause exceptions where there were none before, but will prevent corrupt data (especially spurious deletes!)

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.70833 sec.)

We're Hiring!