From: Javen O'Neal Date: Sat, 25 Jun 2016 05:22:05 +0000 (+0000) Subject: bug 59748: replace remaining Hashtable usages in contrib/poi-ruby and hssf examples X-Git-Tag: REL_3_15_BETA2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b8e40941a147d70b1db557e829fbdcff8eae80e1;p=poi.git bug 59748: replace remaining Hashtable usages in contrib/poi-ruby and hssf examples git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1750182 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/contrib/poi-ruby/Poi4R.i b/src/contrib/poi-ruby/Poi4R.i index 5fe3a66b15..2f72ce9948 100644 --- a/src/contrib/poi-ruby/Poi4R.i +++ b/src/contrib/poi-ruby/Poi4R.i @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -74,7 +74,7 @@ typedef JArray *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); diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java index ace1ef3a98..a666c6ab7b 100644 --- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java +++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java @@ -127,7 +127,8 @@ public class InCellLists { // a Hashtable or HashMap as the ArrayList will preserve the // ordering of the items added to it; the first item added will // be the first item recovered and the last item added, the last - // item recovered. + // item recovered. Alternatively, a LinkedHashMap could be used + // to preserve order. row = sheet.createRow(4); cell = row.createCell(0); multiLevelListItems = new ArrayList();