src/net/java/sip/communicator/impl/protocol/jabber/ServerStoredContactListJabberImpl.java
/**
     * Removes the specified group from the buddy list.
     * @param groupToRemove the group that we'd like removed.
     */
Removes the specified group from the buddy list.
@param groupToRemove the group that we'd like removed.
Removes the specified group from the buddy list . @param groupToRemove the group that we ' d like removed .
public void removeGroup(ContactGroupJabberImpl groupToRemove)
        throws OperationFailedException
    {
        try
        {
            Vector<Contact> localCopy = new Vector<Contact>();
            Iterator<Contact> iter = groupToRemove.contacts();
            while (iter.hasNext())
            {
                localCopy.add(iter.next());
            }
            iter = localCopy.iterator();
            while (iter.hasNext())
            {
                ContactJabberImpl item = (ContactJabberImpl) iter.next();
                if(item.isPersistent())
                    roster.removeEntry(item.getSourceEntry());
            }
        }
        catch (XMPPException
                | InterruptedException
                | NotLoggedInException
                | NotConnectedException
                | NoResponseException ex)
        {
            logger.error("Error removing group", ex);
            throw new OperationFailedException(
                    ex.getMessage(),
                    OperationFailedException.GENERAL_ERROR,
                    ex);
        }
    }
public void removeGroup ( ContactGroupJabberImpl groupToRemove ) throws OperationFailedException { try { Vector < Contact > localCopy = new Vector < Contact > ( ) ; Iterator < Contact > iter = groupToRemove . contacts ( ) ; while ( iter . hasNext ( ) ) { localCopy . add ( iter . next ( ) ) ; } iter = localCopy . iterator ( ) ; while ( iter . hasNext ( ) ) { ContactJabberImpl item = ( ContactJabberImpl ) iter . next ( ) ; if ( item . isPersistent ( ) ) roster . removeEntry ( item . getSourceEntry ( ) ) ; } } catch ( XMPPException | InterruptedException | NotLoggedInException | NotConnectedException | NoResponseException ex ) { logger . error ( "Error removing group" , ex ) ; throw new OperationFailedException ( ex . getMessage ( ) , OperationFailedException . GENERAL_ERROR , ex ) ; } }
Removes the specified group from the buddy list.
Removes the specified group from the buddy list .
// first copy the item that will be removed // when iterating over group contacts and removing them // concurrent exception occures