mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-09 20:31:38 +01:00
Fix compilation error
This commit is contained in:
parent
2df6169dd9
commit
8bffdba725
@ -331,8 +331,6 @@ public abstract class Database {
|
||||
return serverTable;
|
||||
}
|
||||
|
||||
public abstract void commit() throws SQLException;
|
||||
|
||||
public ActionsTable getActionsTable() {
|
||||
return actionsTable;
|
||||
}
|
||||
|
@ -227,6 +227,7 @@ public abstract class SQLDB extends Database {
|
||||
if (uuid == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
Benchmark.start("Remove Account");
|
||||
Log.debug("Database", "Removing Account: " + uuid);
|
||||
@ -237,25 +238,20 @@ public abstract class SQLDB extends Database {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean success = true;
|
||||
for (Table t : getAllTablesInRemoveOrder()) {
|
||||
if (t instanceof UserIDTable) {
|
||||
UserIDTable table = (UserIDTable) t;
|
||||
success = table.removeUser(uuid);
|
||||
if (!success) {
|
||||
break;
|
||||
}
|
||||
if (!(t instanceof UserIDTable)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
UserIDTable table = (UserIDTable) t;
|
||||
if (!table.removeUser(uuid)) {
|
||||
throw new IllegalStateException("Removal Failed");
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
return true;
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Removal Failed");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
rollback(); // TODO Test case
|
||||
return false;
|
||||
} finally {
|
||||
Benchmark.stop("Database", "Remove Account");
|
||||
|
@ -1,11 +1,9 @@
|
||||
package main.java.com.djrapitops.plan.database.tables;
|
||||
|
||||
import com.djrapitops.plugin.utilities.Verify;
|
||||
import main.java.com.djrapitops.plan.Log;
|
||||
import main.java.com.djrapitops.plan.database.databases.SQLDB;
|
||||
import main.java.com.djrapitops.plan.database.sql.Select;
|
||||
import main.java.com.djrapitops.plan.database.sql.Sql;
|
||||
import main.java.com.djrapitops.plan.database.sql.TableSqlParser;
|
||||
import main.java.com.djrapitops.plan.database.sql.Update;
|
||||
import main.java.com.djrapitops.plan.database.sql.*;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
|
Loading…
Reference in New Issue
Block a user