[Date Prev][Date Next] [Chronological] [Thread] [Top]

Some potential error in RoleDAO



I'm not 100% sure, bt it seems that the update() method in RoleDAO is
not correct :

    public final Role update( Role entity )
        throws UpdateException
    {
        ...
        try
        {
            ...
            if ( VUtil.isNotNullOrEmpty( entity.getOccupants() ) )
            {
                for ( String name : entity.getOccupants() )
                {
                    LDAPAttribute occupant = new LDAPAttribute(
ROLE_OCCUPANT, name );
                    mods.add( LDAPModification.REPLACE, occupant );
                }

Here, I think that the ROLE_OCCUPENT Attribute will only contain the
last name, when it should contain all the names.

Thoughts ?

-- 
Regards,
Cordialement,
Emmanuel LÃcharny
www.iktek.com