Addresses #889: update mysql connector

This commit is contained in:
skeletor 2022-03-02 21:44:53 +00:00 committed by Remco
parent 1bb8719cab
commit c865bb2382
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.49</version> <version>8.0.22</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>

View File

@ -257,7 +257,7 @@ public class HabboStats implements Runnable {
try (PreparedStatement statement = connection.prepareStatement("SELECT * FROM users_settings WHERE user_id = ? LIMIT 1")) { try (PreparedStatement statement = connection.prepareStatement("SELECT * FROM users_settings WHERE user_id = ? LIMIT 1")) {
statement.setInt(1, habboInfo.getId()); statement.setInt(1, habboInfo.getId());
try (ResultSet set = statement.executeQuery()) { try (ResultSet set = statement.executeQuery()) {
set.first(); set.next();
if (set.getRow() != 0) { if (set.getRow() != 0) {
stats = new HabboStats(set, habboInfo); stats = new HabboStats(set, habboInfo);
} else { } else {