docs: @Override
  	public ModificationItem[] getModificationItems() {
  		if (!updateMode) {
  			return new ModificationItem[0];
  		}
  
  		List<ModificationItem> tmpList = new LinkedList<ModificationItem>();
  		NamingEnumeration<? extends Attribute> attributesEnumeration = null;
  		try {
  			attributesEnumeration = updatedAttrs.getAll();
  
  			// find attributes that have been changed, removed or added
  			while (attributesEnumeration.hasMore()) {
  				NameAwareAttribute oneAttr = (NameAwareAttribute) attributesEnumeration.next();
  
  				collectModifications(oneAttr, tmpList);
  			}
  		}
  		catch (NamingException e) {
  			throw LdapUtils.convertLdapException(e);
  		}
  		finally {
  			closeNamingEnumeration(attributesEnumeration);
  		}
  
  		if (log.isDebugEnabled()) {
  			log.debug("Number of modifications:" + tmpList.size());
  		}
  
  		return tmpList.toArray(new ModificationItem[tmpList.size()]);
  	}