From 73f609bb87fddc497e7e661ec2880bac9801a11d Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 4 May 2022 16:40:42 -0400 Subject: [PATCH] fix misplaced rs.close(); statement --- .../tylermurphy/hideAndSeek/database/PlayerInfoTable.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/database/PlayerInfoTable.java b/src/main/java/net/tylermurphy/hideAndSeek/database/PlayerInfoTable.java index 5fa196c..e6f29b0 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/database/PlayerInfoTable.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/database/PlayerInfoTable.java @@ -62,15 +62,16 @@ public class PlayerInfoTable { statement.setBytes(1, bytes); ResultSet rs = statement.executeQuery(); if(rs.next()){ - rs.close(); connection.close(); - return new PlayerInfo( + PlayerInfo info = new PlayerInfo( uuid, rs.getInt("wins"), rs.getInt("seeker_wins"), rs.getInt("hider_wins"), rs.getInt("games_played") ); + rs.close(); + return info; } rs.close(); } catch (SQLException e){