Skip to content

Commit

Permalink
Fix SQLExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-dev committed Jun 16, 2024
1 parent 4cf9e68 commit 37aecf7
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public void setParams(PreparedStatement stmt) throws SQLException {
@Override
public void handleRead(ResultSet resultSet) {
try {
resultSet.next();
if (!resultSet.next())
return;
int legionId = resultSet.getInt("legion_id");
legionMember.setRank(LegionRank.valueOf(resultSet.getString("rank")));
legionMember.setNickname(resultSet.getString("nickname"));
Expand Down Expand Up @@ -129,7 +130,8 @@ public void setParams(PreparedStatement stmt) throws SQLException {
@Override
public void handleRead(ResultSet resultSet) {
try {
resultSet.next();
if (!resultSet.next())
return;
legionMemberEx.setName(resultSet.getString("players.name"));
legionMemberEx.setPlayerClass(PlayerClass.valueOf(resultSet.getString("players.player_class")));
legionMemberEx.setLevelByExp(resultSet.getLong("players.exp"));
Expand Down Expand Up @@ -167,7 +169,8 @@ public void setParams(PreparedStatement stmt) throws SQLException {
@Override
public void handleRead(ResultSet resultSet) {
try {
resultSet.next();
if (!resultSet.next())
return;
legionMember.setObjectId(resultSet.getInt("id"));
legionMember.setPlayerClass(PlayerClass.valueOf(resultSet.getString("player_class")));
legionMember.setLevelByExp(resultSet.getLong("exp"));
Expand Down

0 comments on commit 37aecf7

Please sign in to comment.