SteamWar/BungeeCore
Archiviert
13
2

Try with resources
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-12-28 16:16:16 +01:00
Ursprung c928c480f2
Commit 35c16b1fae
2 geänderte Dateien mit 14 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -30,13 +30,13 @@ public class FightPlayer {
if(fightIds.isEmpty())
return fightPlayers;
Statement batch = new Statement("SELECT * FROM FightPlayer WHERE FightID IN (" + fightIds.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")");
batch.select(rs -> {
while(rs.next())
fightPlayers.add(new FightPlayer(rs));
return null;
});
batch.close();
try (Statement batch = new Statement("SELECT * FROM FightPlayer WHERE FightID IN (" + fightIds.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")")) {
batch.select(rs -> {
while(rs.next())
fightPlayers.add(new FightPlayer(rs));
return null;
});
}
return fightPlayers;
}

Datei anzeigen

@ -193,13 +193,13 @@ public class SteamwarUser {
if(ids.isEmpty())
return;
Statement batch = new Statement("SELECT * FROM UserData WHERE id IN (" + ids.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")");
batch.select(rs -> {
while(rs.next())
new SteamwarUser(rs);
return null;
});
batch.close();
try (Statement batch = new Statement("SELECT * FROM UserData WHERE id IN (" + ids.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")")) {
batch.select(rs -> {
while (rs.next())
new SteamwarUser(rs);
return null;
});
}
}
public static SteamwarUser get(Long discordId) {