]> source.dussan.org Git - poi.git/commitdiff
bug 59748: replace remaining Hashtable usages in contrib/poi-ruby and hssf examples
authorJaven O'Neal <onealj@apache.org>
Sat, 25 Jun 2016 05:22:05 +0000 (05:22 +0000)
committerJaven O'Neal <onealj@apache.org>
Sat, 25 Jun 2016 05:22:05 +0000 (05:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1750182 13f79535-47bb-0310-9956-ffa450edef68

src/contrib/poi-ruby/Poi4R.i
src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java

index 5fe3a66b153d9dc17932a85b3ce22164da4e70c5..2f72ce9948904f29e42270fca6addfe2b2d67b43 100644 (file)
@@ -34,7 +34,7 @@
 #include <java/lang/Double.h>
 #include <java/io/StringWriter.h>
 #include <java/io/PrintWriter.h>
-#include <java/util/Hashtable.h>
+#include <java/util/HashMap.h>
 #include <java/util/Date.h>
 #include <java/util/Calendar.h>
 #include <java/lang/System.h>
@@ -74,7 +74,7 @@ typedef JArray<jstring> *jstringArray;
 
 
 static java::lang::Thread *nextThread;
-static java::util::Hashtable *objects;
+static java::util::HashMap *objects;
 
 
 static void store_reference(jobject object) {
@@ -599,9 +599,9 @@ static const jshort         U_SINGLE_ACCOUNTING;
     JvAttachCurrentThread(NULL, NULL);
 
     nextThread = new java::lang::Thread();
-    objects = new java::util::Hashtable();
+    objects = new java::util::HashMap();
 
-    java::util::Hashtable *props = (java::util::Hashtable *)
+    java::util::HashMap *props = (java::util::HashMap *)
         java::lang::System::getProperties();
     props->put(JvNewStringUTF("inRuby"), objects);
 
index ace1ef3a98447b08f802e99ebb5fe4e376d689dc..a666c6ab7b72bbb50fb2e1917b0ec4672f7007bf 100644 (file)
@@ -127,7 +127,8 @@ public class InCellLists {
             // a Hashtable or HashMap as the ArrayList will preserve the\r
             // ordering of the items added to it; the first item added will\r
             // be the first item recovered and the last item added, the last\r
-            // item recovered.\r
+            // item recovered. Alternatively, a LinkedHashMap could be used\r
+            // to preserve order.\r
             row = sheet.createRow(4);\r
             cell = row.createCell(0);\r
             multiLevelListItems = new ArrayList<MultiLevelListItem>();\r