mirror of https://github.com/apache/openjpa.git
moving to JDK1.4 LinkedHashMap instead of LinkedMap where possible.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@474974 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e5f4357f1
commit
54cb8933e3
|
@ -19,8 +19,8 @@ import java.util.Collection;
|
|||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.apache.commons.collections.map.LinkedMap;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ public abstract class CFMetaDataSerializer extends XMLMetaDataSerializer {
|
|||
* that package
|
||||
*/
|
||||
protected Map groupByPackage(Collection objs) throws SAXException {
|
||||
Map packages = new LinkedMap();
|
||||
Map packages = new LinkedHashMap();
|
||||
String packageName;
|
||||
Collection packageObjs;
|
||||
Object obj;
|
||||
|
|
|
@ -30,14 +30,13 @@ import java.util.Calendar;
|
|||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.collections.set.ListOrderedSet;
|
||||
|
||||
/*
|
||||
* ### things to add: - should probably be a SourceTracker
|
||||
* - if an entry is removed, should there be an option to remove comments
|
||||
|
@ -85,7 +84,7 @@ public class FormatPreservingProperties extends Properties {
|
|||
private boolean insertTimestamp = false;
|
||||
|
||||
private PropertySource source;
|
||||
private ListOrderedSet newKeys = new ListOrderedSet();
|
||||
private LinkedHashSet newKeys = new LinkedHashSet();
|
||||
private HashSet modifiedKeys = new HashSet();
|
||||
|
||||
// marker that indicates that we're not deserializing
|
||||
|
@ -237,7 +236,7 @@ public class FormatPreservingProperties extends Properties {
|
|||
c.modifiedKeys = (HashSet) modifiedKeys.clone();
|
||||
|
||||
if (newKeys != null) {
|
||||
c.newKeys = new ListOrderedSet();
|
||||
c.newKeys = new LinkedHashSet();
|
||||
c.newKeys.addAll(newKeys);
|
||||
}
|
||||
|
||||
|
@ -444,7 +443,7 @@ public class FormatPreservingProperties extends Properties {
|
|||
lines.addAll(source);
|
||||
|
||||
// next write out new keys, then the rest of the keys
|
||||
ListOrderedSet keys = new ListOrderedSet();
|
||||
LinkedHashSet keys = new LinkedHashSet();
|
||||
keys.addAll(newKeys);
|
||||
keys.addAll(keySet());
|
||||
|
||||
|
|
Loading…
Reference in New Issue