From 2392c2fda566c86360c3bce191f642dd3cc2a1cd Mon Sep 17 00:00:00 2001 From: Adubbz Date: Thu, 4 Jul 2013 16:33:34 +1000 Subject: [PATCH] Removed leftover changelog code --- .../biomesoplenty/helpers/Version.java | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/src/minecraft/biomesoplenty/helpers/Version.java b/src/minecraft/biomesoplenty/helpers/Version.java index 1a47d1f2a..35d289957 100644 --- a/src/minecraft/biomesoplenty/helpers/Version.java +++ b/src/minecraft/biomesoplenty/helpers/Version.java @@ -145,57 +145,6 @@ public class Version implements Runnable { } } - public static String[] getChangelog() - { - if (cachedChangelog == null) - { - cachedChangelog = grabChangelog(recommendedVersion); - } - - return cachedChangelog; - } - - public static String[] grabChangelog(String version) - { - try { - - String location = REMOTE_CHANGELOG_ROOT + version + ".txt"; - System.out.println(location); - HttpURLConnection conn = null; - while (location != null && !location.isEmpty()) { - URL url = new URL(location); - conn = (HttpURLConnection) url.openConnection(); - conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)"); - conn.connect(); - location = conn.getHeaderField("Location"); - } - - BufferedReader reader = new BufferedReader(new InputStreamReader( - conn.getInputStream())); - - String line = null; - ArrayList changelog = new ArrayList(); - while ((line = reader.readLine()) != null) { - if (line.startsWith("#")) { - continue; - } - if (line.isEmpty()) { - continue; - } - - changelog.add(line); - } - - return changelog.toArray(new String[0]); - - } catch (Exception ex) { - ex.printStackTrace(); - FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, "[BiomesOPlenty] Unable to read changelog from remote site."); - } - - return new String[] { String.format("Unable to retrieve changelog for %s %s", "BiomesOPlenty", version) }; - } - @Override public void run() {