From: Ian Jackson Date: Sun, 5 Sep 2010 12:05:31 +0000 (+0100) Subject: delete stuff about commod table cache X-Git-Tag: 0.9.9~13 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=commitdiff_plain;h=985508c692b6de7964d89ede3b6cf3da1b5b55c7;hp=9eb4c766b8d265e1145e038dc176ac2f9faa0059 delete stuff about commod table cache --- diff --git a/src/com/tedpearson/ypp/market/MarketUploader.java b/src/com/tedpearson/ypp/market/MarketUploader.java index f105f1a..b3fa49f 100644 --- a/src/com/tedpearson/ypp/market/MarketUploader.java +++ b/src/com/tedpearson/ypp/market/MarketUploader.java @@ -438,7 +438,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis return; } - progresslog("getisland..."); + progresslog("(async) getisland..."); getIsland(); progresslog("getocean..."); getOcean(); @@ -447,6 +447,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis if (latch != null) { latch.await(2, java.util.concurrent.TimeUnit.SECONDS); } + progresslog("(async) getisland done"); if (islandName == null) { error("Could not find island name in YPP user interface."); @@ -533,10 +534,12 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis } // get commod map + progresslog("pctb commodmap..."); HashMap commodMap = getCommodMap(); if(commodMap == null) { return; } + progresslog("pctb commodmap done."); int[] offerCount = getBuySellMaps(data,buys,sells,stallMap,commodMap); //println(buys.toString()); // if (dtxt!=null) dtxt.println(sells); @@ -695,13 +698,6 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis /** * Gets the list of commodities and their associated commodity ids. - * On the first run, the data is downloaded from the PCTB server. - * After the first run, the data is cached using Preferences. - *

- * Potential issues: When more commodities are added to the server, this - * program will currently break unless the user deletes the preferences - * file or we give them a new release with a slighly different storage - * location for the data. * * @return a map where the key is the commodity and the value is the commodity id. */ @@ -710,7 +706,6 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis return commodMap; } HashMap map = new HashMap(); - Preferences prefs = Preferences.userNodeForPackage(getClass()); String xml; try { URL host = new URL(PCTB_HOST_URL + "commodmap.php");