9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-30 20:29:28 +00:00

refactor: use Guava methods in various places

This commit is contained in:
William278
2024-01-25 15:42:30 +00:00
parent 530b3ef24d
commit 2e3db2fffa
12 changed files with 33 additions and 29 deletions

View File

@@ -19,6 +19,7 @@
package net.william278.husksync.database;
import com.google.common.collect.Lists;
import com.zaxxer.hikari.HikariDataSource;
import net.william278.husksync.HuskSync;
import net.william278.husksync.adapter.DataAdapter;
@@ -250,7 +251,7 @@ public class MySqlDatabase extends Database {
@Override
@NotNull
public List<DataSnapshot.Packed> getAllSnapshots(@NotNull User user) {
final List<DataSnapshot.Packed> retrievedData = new ArrayList<>();
final List<DataSnapshot.Packed> retrievedData = Lists.newArrayList();
try (Connection connection = getConnection()) {
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
SELECT `version_uuid`, `timestamp`, `data`