mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
UNRATED rating should have ordinal 0 so it corresponds to SQL NULL.
This commit is contained in:
@@ -2,5 +2,5 @@ package net.sf.briar.api.messaging;
|
||||
|
||||
/** The ratings that may be applied to an author in peer moderation. */
|
||||
public enum Rating {
|
||||
BAD, UNRATED, GOOD
|
||||
UNRATED, BAD, GOOD
|
||||
}
|
||||
|
||||
@@ -1522,6 +1522,7 @@ abstract class JdbcDatabase implements Database<Connection> {
|
||||
String authorName = rs.getString(4);
|
||||
byte[] authorKey = rs.getBytes(5);
|
||||
author = new Author(authorId, authorName, authorKey);
|
||||
// NULL == 0 == UNRATED
|
||||
rating = Rating.values()[rs.getByte(6)];
|
||||
}
|
||||
String contentType = rs.getString(7);
|
||||
|
||||
Reference in New Issue
Block a user