Removed leftover changelog code
This commit is contained in:
parent
1dc72e7ab6
commit
2392c2fda5
1 changed files with 0 additions and 51 deletions
|
@ -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<String> changelog = new ArrayList<String>();
|
||||
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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue