Bug fix makeCompetion if fileName is not in the resultSet
This commit is contained in:
parent
27388e4a75
commit
7509c38dc0
1 changed files with 5 additions and 1 deletions
|
@ -116,8 +116,12 @@ public class DatabaseRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Completion makeCompletion(int playerId, int puzzleId, ResultSet completionResult) throws SQLException {
|
private Completion makeCompletion(int playerId, int puzzleId, ResultSet completionResult) throws SQLException {
|
||||||
|
String name = null;
|
||||||
|
if (hasColumn(completionResult, "fileName"))
|
||||||
|
name = completionResult.getString("fileName");
|
||||||
|
|
||||||
return new Completion(playerId, puzzleId, completionResult.getInt("tries"),
|
return new Completion(playerId, puzzleId, completionResult.getInt("tries"),
|
||||||
completionResult.getString("fileName"), completionResult.getInt("score"));
|
name, completionResult.getInt("score"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Player makePlayer(ResultSet playerResult) throws SQLException {
|
private Player makePlayer(ResultSet playerResult) throws SQLException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue