Minor improvements to the demo Application and a fix for when the ACK is empty

This commit is contained in:
2016-04-25 08:13:46 +02:00
parent 61890b3da9
commit a0505f5704
4 changed files with 14 additions and 12 deletions

View File

@ -105,7 +105,8 @@ public class JdbcMessageRepository extends JdbcHelper implements MessageReposito
try (
Connection connection = config.getConnection();
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT count(*) FROM Message WHERE " + where)
ResultSet rs = stmt.executeQuery("SELECT count(*) FROM Message WHERE " + where
+ " ORDER BY received DESC")
) {
if (rs.next()) {
return rs.getInt(1);