poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1178153 - /poi/trunk/src/java/org/apache/poi/hpsf/Property.java
Date Sun, 02 Oct 2011 08:58:11 GMT
Author: sergey
Date: Sun Oct  2 08:58:11 2011
New Revision: 1178153

URL: http://svn.apache.org/viewvc?rev=1178153&view=rev
Log:
preserve entries order in dictionaries

Modified:
    poi/trunk/src/java/org/apache/poi/hpsf/Property.java

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Property.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Property.java?rev=1178153&r1=1178152&r2=1178153&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Property.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Property.java Sun Oct  2 08:58:11 2011
@@ -18,7 +18,7 @@
 package org.apache.poi.hpsf;
 
 import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import org.apache.poi.util.HexDump;
@@ -193,7 +193,7 @@ public class Property
      * @throws UnsupportedEncodingException if the dictionary's codepage is not
      *         (yet) supported.
      */
-    protected Map readDictionary(final byte[] src, final long offset,
+    protected Map<?, ?> readDictionary(final byte[] src, final long offset,
                                  final int length, final int codepage)
     throws UnsupportedEncodingException
     {
@@ -210,7 +210,8 @@ public class Property
         final long nrEntries = LittleEndian.getUInt(src, o);
         o += LittleEndian.INT_SIZE;
 
-        final Map m = new HashMap((int) nrEntries, (float) 1.0);
+        final Map<Object, Object> m = new LinkedHashMap<Object, Object>(
+                (int) nrEntries, (float) 1.0 );
 
         try
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message