Skip to content

Commit

Permalink
IntelliJ code inspection clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraLS3 committed Apr 7, 2018
1 parent 716ca51 commit fc79424
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 130 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public boolean onCommand(ISender sender, String commandLabel, String[] args) {
return true;
}

Processing.submitNonCritical(() -> {
testServers(sender);
});
Processing.submitNonCritical(() -> testServers(sender));

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,12 @@ public class TransferTable extends Table {
private final String insertStatementNoParts;

private final ServerTable serverTable;
private final String insertStatementParts;
private final String selectStatement;

public TransferTable(SQLDB db) {
super("plan_transfer", db);

serverTable = db.getServerTable();
insertStatementParts = "REPLACE INTO " + tableName + " (" +
Col.SENDER_ID + ", " +
Col.EXPIRY + ", " +
Col.INFO_TYPE + ", " +
Col.EXTRA_VARIABLES + ", " +
Col.CONTENT + ", " +
Col.PART +
") VALUES (" +
serverTable.statementSelectServerID + ", " +
"?, ?, ?, ?, ?)";
insertStatementNoParts = "REPLACE INTO " + tableName + " (" +
Col.SENDER_ID + ", " +
Col.EXPIRY + ", " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
public abstract class UserIDTable extends Table {

@Deprecated
protected final String columnUserID = "user_id";

public enum Col implements Column {
USER_ID("user_id");

Expand Down Expand Up @@ -46,7 +43,7 @@ public UserIDTable(String name, SQLDB db) {
}

public void removeUser(UUID uuid) throws SQLException {
String sql = "DELETE FROM " + tableName + " WHERE (" + columnUserID + "=" + usersTable.statementSelectID + ")";
String sql = "DELETE FROM " + tableName + " WHERE (" + Col.USER_ID + "=" + usersTable.statementSelectID + ")";

execute(new ExecStatement(sql) {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ public WorldTimes processResults(ResultSet set) throws SQLException {
});
}

public WorldTimes getWorldTimesOfServer() throws SQLException {
return getWorldTimesOfServer(ServerInfo.getServerUUID());
}

public WorldTimes getWorldTimesOfUser(UUID uuid) throws SQLException {
String worldIDColumn = worldTable + "." + WorldTable.Col.ID;
String worldNameColumn = worldTable + "." + WorldTable.Col.NAME + " as world_name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public long getTimeSent() {
/**
* Most recent first.
*
* @param o
* @return
* @param o object
* @return -1 or 1
*/
@Override
public int compareTo(Entry o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public void sendRequest() throws WebException {
connection.setRequestProperty("charset", "UTF-8");

String parameters = parseVariables();
infoRequest.placeDataToDatabase();

connection.setRequestProperty("Content-Length", Integer.toString(parameters.length()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public static CacheAnalysisPageRequest createHandler() {
return new CacheAnalysisPageRequest();
}

@Override
public void placeDataToDatabase() {
/* Transferred over HTTP */
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, html (Base64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public static CacheInspectPageRequest createHandler() {
return new CacheInspectPageRequest();
}

@Override
public void placeDataToDatabase() {
/* Transferred over HTTP */
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, player, html (Base64)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public static CacheInspectPluginsTabRequest createHandler() {
return new CacheInspectPluginsTabRequest();
}

@Override
public void placeDataToDatabase() {
/* Transferred over HTTP */
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, player, nav, html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ private CacheNetworkPageContentRequest() {
html = null;
}

@Override
public void placeDataToDatabase() {
/* Transferred over HTTP */
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, serverName, html (Base64)
Expand All @@ -69,7 +64,7 @@ private NetworkPageContent getNetworkPageContent() {

@Override
public void runLocally() {
getNetworkPageContent().addElement(ServerInfo.getServerName(), variables.get("html"));
getNetworkPageContent().addElement(ServerInfo.getServerName(), html);
}

public static CacheNetworkPageContentRequest createHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public static CheckConnectionRequest createHandler() {
return new CheckConnectionRequest();
}

@Override
public void placeDataToDatabase() {
/* Not necessary */
}

@Override
public void runLocally() {
/* Won't be run */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ private GenerateAnalysisPageRequest() {
serverUUID = null;
}

@Override
public void placeDataToDatabase() {
// No data required in a Generate request
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Variables available: sender, server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public static GenerateInspectPageRequest createHandler() {
return new GenerateInspectPageRequest();
}

@Override
public void placeDataToDatabase() {
// No data required in a Generate request
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, player
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ public static GenerateInspectPluginsTabRequest createHandler() {
return new GenerateInspectPluginsTabRequest();
}

@Override
public void placeDataToDatabase() {
// No data required in a Generate request
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
// Available variables: sender, player
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ public static GenerateNetworkPageContentRequest createHandler() {
return new GenerateNetworkPageContentRequest();
}

@Override
public void placeDataToDatabase() {
/* No Data needed on a GenerateRequest.*/
}

@Override
public Response handleRequest(Map<String, String> variables) throws WebException {
InfoSystem.getInstance().updateNetworkPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
public interface InfoRequest {

void placeDataToDatabase() throws WebException;

Response handleRequest(Map<String, String> variables) throws WebException;

void runLocally() throws WebException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public static SaveDBSettingsRequest createHandler() {
return new SaveDBSettingsRequest(true);
}

@Override
public void placeDataToDatabase() {
/* Not necessary */
}

@Override
public void runLocally() {
/* Won't be run */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ public static SendDBSettingsRequest createHandler() {
return new SendDBSettingsRequest();
}

@Override
public void placeDataToDatabase() {
/* Not necessary */
}

@Override
public void runLocally() {
/* Won't be run */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public BungeeListenerSystem(PlanBungee plugin) {

@Override
protected void registerListeners() {
plugin.registerListener(new PlayerOnlineListener(plugin));
plugin.registerListener(new PlayerOnlineListener());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package com.djrapitops.plan.system.listeners.bungee;

import com.djrapitops.plan.PlanBungee;
import com.djrapitops.plan.system.processing.Processing;
import com.djrapitops.plan.system.processing.processors.player.BungeePlayerRegisterProcessor;
import com.djrapitops.plan.utilities.MiscUtils;
Expand All @@ -23,12 +22,6 @@
*/
public class PlayerOnlineListener implements Listener {

private final PlanBungee plugin;

public PlayerOnlineListener(PlanBungee plugin) {
this.plugin = plugin;
}

@EventHandler
public void onPostLogin(PostLoginEvent event) {
try {
Expand Down

This file was deleted.

0 comments on commit fc79424

Please sign in to comment.