Author: j16sdiz
Date: 2008-05-05 13:01:35 +0000 (Mon, 05 May 2008)
New Revision: 19758

Modified:
   trunk/freenet/src/freenet/io/comm/MessageFilter.java
Log:
use LinkedList instead of Vector(1,1)


Modified: trunk/freenet/src/freenet/io/comm/MessageFilter.java
===================================================================
--- trunk/freenet/src/freenet/io/comm/MessageFilter.java        2008-05-05 
12:12:06 UTC (rev 19757)
+++ trunk/freenet/src/freenet/io/comm/MessageFilter.java        2008-05-05 
13:01:35 UTC (rev 19758)
@@ -37,7 +37,7 @@
     private PeerContext _droppedConnection;
        private MessageType _type;
     private HashMap _fields = new HashMap();
-    private Vector _fieldList = new Vector(1,1);
+    private List _fieldList = new LinkedList();
     private PeerContext _source;
     private long _timeout;
     /** If true, timeouts are relative to the start of waiting, if false, they 
are relative to
@@ -177,8 +177,9 @@
                        return false;
                }
                synchronized (_fields) {
-                       for (int i = 0; i < _fieldList.size(); i++) {
-                               String fieldName = (String) _fieldList.get(i);
+                       ListIterator it = _fieldList.listIterator();
+                       while (it.hasNext()) {
+                               String fieldName = (String) it.next();
                                if (!m.isSet(fieldName)) {
                                        return false;
                                }


Reply via email to