From 72bc75372442d67b1d5b063f77a1f1d1d5f1a5f4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 18 Apr 2024 20:44:23 -0500 Subject: [PATCH] mine audit --- src/engine/db/handlers/dbMineHandler.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/db/handlers/dbMineHandler.java b/src/engine/db/handlers/dbMineHandler.java index ec8c0f6e..f00e900d 100644 --- a/src/engine/db/handlers/dbMineHandler.java +++ b/src/engine/db/handlers/dbMineHandler.java @@ -15,6 +15,7 @@ import engine.objects.MineProduction; import engine.objects.Resource; import org.pmw.tinylog.Logger; +import java.net.UnknownHostException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -69,9 +70,11 @@ public class dbMineHandler extends dbHandlerBase { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) { ResultSet rs = preparedStatement.executeQuery(); - mines = getObjectsFromRs(rs, 1000); + while(rs.next()){ + mines.add(new Mine(rs)); + } - } catch (SQLException e) { + } catch (SQLException | UnknownHostException e) { Logger.error(e); } return mines;