Another batch of preemptive bugfixing

This commit is contained in:
ceikry 2021-07-26 07:33:07 -05:00
parent 62ab9e80a9
commit 13dce7226e
19 changed files with 84 additions and 84 deletions

View file

@ -132,6 +132,8 @@ public final class PlayerSession {
ex.printStackTrace();
SQLManager.close(connection);
return false;
} finally {
SQLManager.close(connection);
}
return true;
}
@ -160,6 +162,8 @@ public final class PlayerSession {
} catch (SQLException e) {
e.printStackTrace();
SQLManager.close(connection);
} finally {
SQLManager.close(connection);
}
communication.clear();
}
@ -201,6 +205,8 @@ public final class PlayerSession {
} catch (SQLException e) {
e.printStackTrace();
SQLManager.close(connection);
} finally {
SQLManager.close(connection);
}
}
@ -459,7 +465,9 @@ public final class PlayerSession {
@Override
public boolean equals(Object o) {
return username.equals(((PlayerSession) o).username);
if(o instanceof PlayerSession) {
return username.equals(((PlayerSession) o).username);
} else return false;
}
@Override

View file

@ -19,7 +19,7 @@ public class WorldDatabase {
/**
* The game servers.
*/
public static final GameServer[] DATABASE = new GameServer[ServerConstants.WORLD_LIMIT];
private static final GameServer[] DATABASE = new GameServer[ServerConstants.WORLD_LIMIT];
/**
* The update time stamp.

View file

@ -102,6 +102,8 @@ public class UIDInfo {
case 4:
serial = ByteBufferUtils.getString(buffer);
break;
default:
break;
}
}
}
@ -112,7 +114,7 @@ public class UIDInfo {
* @return the string.
*/
private String parseFormat(String string) {
if (string == null || string == "") {
if (string == null || string.equals("")) {
return null;
}
StringTokenizer token = new StringTokenizer(string, "|");