svn commit: r562419 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs,gmane.spam.detected
Message-ID <[email protected]>
Author: andreas
Date: Fri Aug  3 05:01:47 2007
New Revision: 562419

URL: http://svn.apache.org/viewvc?view=rev&rev=562419
Log:
Use LinkedHashMap to preserve resource type sample order. This fixes bug 42942.

Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java?view=diff&rev=562419&r1=562418&r2=562419
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java Fri Aug  3 05:01:47 2007
@@ -20,6 +20,7 @@
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -125,7 +126,7 @@
 
     protected Map loadSamples(Configuration samplesParentConfig) throws ConfigurationException {
         Configuration[] samplesConf = samplesParentConfig.getChildren(SAMPLE_NAME);
-        Map samples = new HashMap();
+        Map samples = new LinkedHashMap();
         for (int i = 0; i < samplesConf.length; i++) {
             String name = samplesConf[i].getAttribute(SAMPLE_NAME_ATTRIBUTE, DEFAULT_SAMPLE_NAME);
             String mimeType = samplesConf[i].getAttribute(SAMPLE_MIME_TYPE_ATTRIBUTE);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.