Skip to content

Commit 3ab2026

Browse files
committed
People don't care if updater sites are down
1 parent 98413c9 commit 3ab2026

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

modules/ProtocolLib/src/main/java/com/comphenix/protocol/updater/BukkitUpdater.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,12 @@ public boolean read() {
354354
this.plugin.getLogger().warning("Please double-check your configuration to ensure it is correct.");
355355
this.result = UpdateResult.FAIL_APIKEY;
356356
} else {
357-
this.plugin.getLogger().warning("The updater could not contact dev.bukkit.org for updating.");
358-
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.");
357+
// People don't care
358+
// this.plugin.getLogger().warning("The updater could not contact dev.bukkit.org for updating.");
359+
// 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.");
359360
this.result = UpdateResult.FAIL_DBO;
360361
}
361-
e.printStackTrace();
362+
// e.printStackTrace();
362363
return false;
363364
}
364365
}

modules/ProtocolLib/src/main/java/com/comphenix/protocol/updater/SpigotUpdater.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.io.InputStreamReader;
2222
import java.net.HttpURLConnection;
2323
import java.net.URL;
24-
import java.util.logging.Level;
2524

2625
import org.bukkit.plugin.Plugin;
2726

@@ -75,7 +74,8 @@ public void run() {
7574
ProtocolLibrary.getErrorReporter().reportDetailed(
7675
SpigotUpdater.this, Report.newBuilder(REPORT_CANNOT_UPDATE_PLUGIN).error(ex).callerParam(this));
7776
} else {
78-
plugin.getLogger().log(Level.WARNING, "Failed to check for updates: " + ex);
77+
// People don't care
78+
// plugin.getLogger().log(Level.WARNING, "Failed to check for updates: " + ex);
7979
}
8080

8181
ProtocolLibrary.disableUpdates();

modules/ProtocolLib/src/test/java/com/comphenix/protocol/updater/UpdaterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ public class UpdaterTest {
2323
private static final int BUKKIT_DEV_ID = 45564;
2424
private static Plugin plugin;
2525

26-
//@BeforeClass
26+
// @BeforeClass
2727
public static void preparePlugin() {
2828
Server server = mock(Server.class);
2929
when(server.getUpdateFolder()).thenReturn(null);
3030

3131
plugin = mock(Plugin.class);
3232
String version = System.getProperty("projectVersion");
33-
if (version == null) version = "4.0.1-SNAPSHOT-b281";
33+
if (version == null) version = "4.2.1";
3434
when(plugin.getDescription()).thenReturn(new PluginDescriptionFile("ProtocolLib", version, null));
3535
when(plugin.getLogger()).thenReturn(Logger.getLogger("ProtocolLib"));
3636
when(plugin.getDataFolder()).thenReturn(null);
3737
when(plugin.getServer()).thenReturn(server);
3838
}
3939

40-
//@Test
40+
// @Test
4141
public void testSpigotUpdater() {
4242
SpigotUpdater updater = new SpigotUpdater(plugin, UpdateType.NO_DOWNLOAD, true);
4343

@@ -54,7 +54,7 @@ public void testSpigotUpdater() {
5454
System.out.println("Update available: " + updater.versionCheck(remote));
5555
}
5656

57-
//@Test
57+
// @Test
5858
public void testBukkitUpdater() {
5959
BukkitUpdater updater = new BukkitUpdater(plugin, BUKKIT_DEV_ID, null, UpdateType.NO_DOWNLOAD, true);
6060
if (! updater.read()) {

0 commit comments

Comments
 (0)