Issue #1783 Modified DefaultPluginArchiveFileNameFormatter to use LinkList instead of ArrayList.
Change-Id: I156fc0f335320489923ae31f6e790f5e86ac26f4 Former-commit-id:b5743e8f9b
[formerlyc5a2786c84
[formerly 8ec4ac592389af736c45a11d9c6f6613fd9da504]] Former-commit-id:c5a2786c84
Former-commit-id:f912d9ece3
This commit is contained in:
parent
e17f8e0511
commit
82b526851a
1 changed files with 8 additions and 4 deletions
|
@ -20,12 +20,12 @@
|
|||
package com.raytheon.uf.edex.maintenance.archive;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -39,7 +39,7 @@ import com.raytheon.uf.edex.database.DataAccessLayerException;
|
|||
import com.raytheon.uf.edex.database.plugin.PluginDao;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* The default implementation of IPluginArchiveFileNameFormatter.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -48,6 +48,9 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 20, 2012 dgilling Initial creation
|
||||
* Mar 12, 2013 1783 rferrel Replace ArrayList with LinkedList to
|
||||
* remove excess capacity and reduce
|
||||
* time to resize a growing list.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -67,6 +70,7 @@ public class DefaultPluginArchiveFileNameFormatter implements
|
|||
* com.raytheon.uf.edex.database.plugin.PluginDao, java.util.Map,
|
||||
* java.util.Calendar, java.util.Calendar)
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Map<String, List<PersistableDataObject>> getPdosByFile(
|
||||
String pluginName, PluginDao dao,
|
||||
|
@ -91,7 +95,7 @@ public class DefaultPluginArchiveFileNameFormatter implements
|
|||
newFileEntries.add(path);
|
||||
List<PersistableDataObject> list = pdoMap.get(path);
|
||||
if (list == null) {
|
||||
list = new ArrayList<PersistableDataObject>(pdos.size());
|
||||
list = new LinkedList<PersistableDataObject>();
|
||||
pdoMap.put(path, list);
|
||||
}
|
||||
list.add(pdo);
|
||||
|
@ -117,7 +121,7 @@ public class DefaultPluginArchiveFileNameFormatter implements
|
|||
newFileEntries.add(path);
|
||||
List<PersistableDataObject> list = pdoMap.get(path);
|
||||
if (list == null) {
|
||||
list = new ArrayList<PersistableDataObject>(pdos.size());
|
||||
list = new LinkedList<PersistableDataObject>();
|
||||
pdoMap.put(path, list);
|
||||
}
|
||||
list.add(pdo);
|
||||
|
|
Loading…
Add table
Reference in a new issue