mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
Rewrote a query that appears to have been written while on crack.
This commit is contained in:
@@ -1340,11 +1340,11 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
String sql = "SELECT name, publicKey, privateKey FROM localAuthors"
|
String sql = "SELECT name, publicKey, privateKey FROM localAuthors"
|
||||||
+ " WHERE authorId = ?";
|
+ " WHERE authorId = ?";
|
||||||
ps = txn.prepareStatement(sql);
|
ps = txn.prepareStatement(sql);
|
||||||
|
ps.setBytes(1, a.getBytes());
|
||||||
rs = ps.executeQuery();
|
rs = ps.executeQuery();
|
||||||
if(!rs.next()) throw new DbStateException();
|
if(!rs.next()) throw new DbStateException();
|
||||||
AuthorId id = new AuthorId(rs.getBytes(1));
|
LocalAuthor localAuthor = new LocalAuthor(a, rs.getString(1),
|
||||||
LocalAuthor localAuthor = new LocalAuthor(id, rs.getString(2),
|
rs.getBytes(2), rs.getBytes(3));
|
||||||
rs.getBytes(3), rs.getBytes(4));
|
|
||||||
if(rs.next()) throw new DbStateException();
|
if(rs.next()) throw new DbStateException();
|
||||||
rs.close();
|
rs.close();
|
||||||
ps.close();
|
ps.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user