Explicitly set scrolling mode where ResultSet is used for scrolling

This commit is contained in:
P0nk
2021-04-02 16:41:44 +02:00
parent 754ab67de7
commit 08a0407417
5 changed files with 14 additions and 11 deletions

View File

@@ -247,9 +247,10 @@ public final class MonsterBook {
public static int[] getCardTierSize() {
try {
Connection con = DatabaseConnection.getConnection();
PreparedStatement ps = con.prepareStatement("SELECT COUNT(*) FROM monstercarddata GROUP BY floor(cardid / 1000);");
PreparedStatement ps = con.prepareStatement("SELECT COUNT(*) FROM monstercarddata GROUP BY floor(cardid / 1000);",
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs = ps.executeQuery();
rs.last();
int[] tierSizes = new int[rs.getRow()];
rs.beforeFirst();