Minor Refactoring of IPCConnectionManager

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_dev_next@1139 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-ipc/src/main/java/edu/uci/ics/hyracks/ipc/impl/IPCConnectionManager.java b/hyracks-ipc/src/main/java/edu/uci/ics/hyracks/ipc/impl/IPCConnectionManager.java
index eef068b..6f62760 100644
--- a/hyracks-ipc/src/main/java/edu/uci/ics/hyracks/ipc/impl/IPCConnectionManager.java
+++ b/hyracks-ipc/src/main/java/edu/uci/ics/hyracks/ipc/impl/IPCConnectionManager.java
@@ -289,15 +289,12 @@
         }
 
         private void copyUnsentMessages(BitSet unsentMessagesBitmap, List<Message> tempUnsentMessages) {
-            tempUnsentMessages.clear();
+            assert tempUnsentMessages.isEmpty();
             for (int i = unsentMessagesBitmap.nextSetBit(0); i >= 0; i = unsentMessagesBitmap.nextSetBit(i + 1)) {
                 tempUnsentMessages.add(workingSendList.get(i));
             }
             workingSendList.clear();
-            int tempLen = tempUnsentMessages.size();
-            for (int i = 0; i < tempLen; ++i) {
-                workingSendList.add(tempUnsentMessages.get(i));
-            }
+            moveAll(tempUnsentMessages, workingSendList);
         }
     }