protected void addPendingJoin(InternalDistributedMember id){
synchronized (this.pendingJoinsLock) {
    List oldPendingJoins=this.pendingJoins;
    if (!oldPendingJoins.contains(id)) {
      List newPendingJoins=new ArrayList(oldPendingJoins);
      newPendingJoins.add(id);
      this.pendingJoins=newPendingJoins;
    }
  }
}

protected void addPendingJoin ( InternalDistributedMember id ) { synchronized ( this . pendingJoinsLock ) { List oldPendingJoins = this . pendingJoins ; if ( ! oldPendingJoins . contains ( id ) ) { List newPendingJoins = new ArrayList ( oldPendingJoins ) ; newPendingJoins . add ( id ) ; this . pendingJoins = newPendingJoins ; } } }
adds a pending join entry . note : attempting to reuse the same arraylist instance results in some interesting deadlocks .
