Archiviert
13
0

People don't care if updater sites are down

Dieser Commit ist enthalten in:
Dan Mulloy 2017-02-04 12:12:31 -05:00
Ursprung 98413c917e
Commit 3ab2026d62
3 geänderte Dateien mit 10 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -354,11 +354,12 @@ public class BukkitUpdater extends Updater {
this.plugin.getLogger().warning("Please double-check your configuration to ensure it is correct."); this.plugin.getLogger().warning("Please double-check your configuration to ensure it is correct.");
this.result = UpdateResult.FAIL_APIKEY; this.result = UpdateResult.FAIL_APIKEY;
} else { } else {
this.plugin.getLogger().warning("The updater could not contact dev.bukkit.org for updating."); // People don't care
this.plugin.getLogger().warning("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime."); // this.plugin.getLogger().warning("The updater could not contact dev.bukkit.org for updating.");
// this.plugin.getLogger().warning("If you have not recently modified your configuration and this is the first time you are seeing this message, the site may be experiencing temporary downtime.");
this.result = UpdateResult.FAIL_DBO; this.result = UpdateResult.FAIL_DBO;
} }
e.printStackTrace(); // e.printStackTrace();
return false; return false;
} }
} }

Datei anzeigen

@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.util.logging.Level;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
@ -75,7 +74,8 @@ public final class SpigotUpdater extends Updater {
ProtocolLibrary.getErrorReporter().reportDetailed( ProtocolLibrary.getErrorReporter().reportDetailed(
SpigotUpdater.this, Report.newBuilder(REPORT_CANNOT_UPDATE_PLUGIN).error(ex).callerParam(this)); SpigotUpdater.this, Report.newBuilder(REPORT_CANNOT_UPDATE_PLUGIN).error(ex).callerParam(this));
} else { } else {
plugin.getLogger().log(Level.WARNING, "Failed to check for updates: " + ex); // People don't care
// plugin.getLogger().log(Level.WARNING, "Failed to check for updates: " + ex);
} }
ProtocolLibrary.disableUpdates(); ProtocolLibrary.disableUpdates();

Datei anzeigen

@ -30,7 +30,7 @@ public class UpdaterTest {
plugin = mock(Plugin.class); plugin = mock(Plugin.class);
String version = System.getProperty("projectVersion"); String version = System.getProperty("projectVersion");
if (version == null) version = "4.0.1-SNAPSHOT-b281"; if (version == null) version = "4.2.1";
when(plugin.getDescription()).thenReturn(new PluginDescriptionFile("ProtocolLib", version, null)); when(plugin.getDescription()).thenReturn(new PluginDescriptionFile("ProtocolLib", version, null));
when(plugin.getLogger()).thenReturn(Logger.getLogger("ProtocolLib")); when(plugin.getLogger()).thenReturn(Logger.getLogger("ProtocolLib"));
when(plugin.getDataFolder()).thenReturn(null); when(plugin.getDataFolder()).thenReturn(null);