You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2006/11/14 21:57:03 UTC
svn commit: r474974 - in
/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib:
meta/CFMetaDataSerializer.java util/FormatPreservingProperties.java
Author: pcl
Date: Tue Nov 14 12:57:02 2006
New Revision: 474974
URL: http://svn.apache.org/viewvc?view=rev&rev=474974
Log:
moving to JDK1.4 LinkedHashMap instead of LinkedMap where possible.
Modified:
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java?view=diff&rev=474974&r1=474973&r2=474974
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataSerializer.java Tue Nov 14 12:57:02 2006
@@ -19,8 +19,8 @@
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 @@
* that package
*/
protected Map groupByPackage(Collection objs) throws SAXException {
- Map packages = new LinkedMap();
+ Map packages = new LinkedHashMap();
String packageName;
Collection packageObjs;
Object obj;
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java?view=diff&rev=474974&r1=474973&r2=474974
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/FormatPreservingProperties.java Tue Nov 14 12:57:02 2006
@@ -30,14 +30,13 @@
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 @@
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 @@
c.modifiedKeys = (HashSet) modifiedKeys.clone();
if (newKeys != null) {
- c.newKeys = new ListOrderedSet();
+ c.newKeys = new LinkedHashSet();
c.newKeys.addAll(newKeys);
}
@@ -444,7 +443,7 @@
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());