Commented on empty blocks

This commit is contained in:
Rsl1122 2018-11-11 21:38:27 +02:00
parent 61016e1fef
commit 95bd33e3c4
8 changed files with 18 additions and 17 deletions

View File

@ -64,6 +64,7 @@ public class DataCache extends SessionCache implements SubSystem {
@Override
public void enable() {
// Nothing to enable
}
@Override

View File

@ -111,13 +111,10 @@ public class H2DB extends SQLDB {
private void startConnectionPingTask() {
stopConnectionPingTask();
try {
// Maintains Connection.
connectionPingTask = runnableFactory.create("DBConnectionPingTask " + getType().getName(),
new KeepAliveTask(connection, () -> getNewConnection(databaseFile), logger, errorHandler)
).runTaskTimerAsynchronously(60L * 20L, 60L * 20L);
} catch (Exception ignored) {
}
// Maintains Connection.
connectionPingTask = runnableFactory.create("DBConnectionPingTask " + getType().getName(),
new KeepAliveTask(connection, () -> getNewConnection(databaseFile), logger, errorHandler)
).runTaskTimerAsynchronously(60L * 20L, 60L * 20L);
}
private void stopConnectionPingTask() {
@ -125,6 +122,8 @@ public class H2DB extends SQLDB {
try {
connectionPingTask.cancel();
} catch (Exception ignored) {
// Sometimes task systems fail to cancel a task,
// usually this is called on disable, so no need for users to report this.
}
}
}

View File

@ -104,13 +104,10 @@ public class SQLiteDB extends SQLDB {
private void startConnectionPingTask() {
stopConnectionPingTask();
try {
// Maintains Connection.
connectionPingTask = runnableFactory.create("DBConnectionPingTask " + getType().getName(),
new KeepAliveTask(connection, () -> getNewConnection(databaseFile), logger, errorHandler)
).runTaskTimerAsynchronously(60L * 20L, 60L * 20L);
} catch (Exception ignored) {
}
// Maintains Connection.
connectionPingTask = runnableFactory.create("DBConnectionPingTask " + getType().getName(),
new KeepAliveTask(connection, () -> getNewConnection(databaseFile), logger, errorHandler)
).runTaskTimerAsynchronously(60L * 20L, 60L * 20L);
}
private void stopConnectionPingTask() {
@ -118,6 +115,8 @@ public class SQLiteDB extends SQLDB {
try {
connectionPingTask.cancel();
} catch (Exception ignored) {
// Sometimes task systems fail to cancel a task,
// usually this is called on disable, so no need for users to report this.
}
}
}

View File

@ -57,6 +57,6 @@ public class ExportSystem implements SubSystem {
@Override
public void disable() {
// Nothing to disable
}
}

View File

@ -29,6 +29,7 @@ public class EmptyImportSystem extends ImportSystem {
@Inject
public EmptyImportSystem() {
// Inject constructor required for dagger
}
@Override

View File

@ -65,7 +65,7 @@ public class Theme implements SubSystem {
@Override
public void disable() {
// No need to save theme on disable
}
private String getColor(ThemeVal variable) {

View File

@ -28,6 +28,7 @@ public class PlayersPageRefreshTask extends AbsRunnable {
@Inject
public PlayersPageRefreshTask() {
// Inject constructor required for dagger
}
@Override

View File

@ -277,7 +277,7 @@ public class WebServer implements SubSystem {
}
public boolean isAuthRequired() {
return usingHttps;
return isUsingHTTPS();
}
public String getAccessAddress() {