title: i get ConcurrentModificationException when adding an item
body: <p>im trying to save the manager id  of distinct  managers  from collabs to managersId but i get an exeption "ConcurrentModificationException"</p>
  
  <pre><code>public void fillTree() throws SystemException, PortalException {
  
          TreeNode nodeParent;
          TreeNode nodeFils;
          Set&lt;Long&gt; managersId = new HashSet&lt;Long&gt;();
          UserVO user = new UserVO();
          collabs = CollabLocalServiceUtil.getCollabs(-1, -1);
          Iterator&lt;Long&gt; iter = managersId.iterator();
          long id;
          for (int i = 0; i &lt; collabs.size(); i++) {
              id = collabs.get(i).getManagerId();
              synchronized (managersId) {
                  managersId.add((Long) id);
                  System.out.println(id);
  
              }
  
          }
  
  
  
          while (iter.hasNext()) {
              id = iter.next();//throw exeption
              user = getUserById(id);
              nodeParent = new DefaultTreeNode(user.getFullName(), root);
              for (int j = 0; j &lt; collabs.size(); j++) {
                  if (collabs.get(j).getManagerId() == user.getUserId()) {
  
                      nodeFils = new DefaultTreeNode(getUserById(
                              collabs.get(j).getUserId()).getFullName(),
                              nodeParent);
                  }
              }
          }
  
      }
  </code></pre>
  
  <p>im using liferay portal  </p>