fix misplaced rs.close(); statement

This commit is contained in:
Tyler Murphy 2022-05-04 16:40:42 -04:00
parent b870eac53b
commit 73f609bb87

View file

@ -62,15 +62,16 @@ public class PlayerInfoTable {
statement.setBytes(1, bytes); statement.setBytes(1, bytes);
ResultSet rs = statement.executeQuery(); ResultSet rs = statement.executeQuery();
if(rs.next()){ if(rs.next()){
rs.close();
connection.close(); connection.close();
return new PlayerInfo( PlayerInfo info = new PlayerInfo(
uuid, uuid,
rs.getInt("wins"), rs.getInt("wins"),
rs.getInt("seeker_wins"), rs.getInt("seeker_wins"),
rs.getInt("hider_wins"), rs.getInt("hider_wins"),
rs.getInt("games_played") rs.getInt("games_played")
); );
rs.close();
return info;
} }
rs.close(); rs.close();
} catch (SQLException e){ } catch (SQLException e){