mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Small code cleanups.
This commit is contained in:
@@ -141,7 +141,7 @@ public class KeyManagerImplTest extends BrambleMockTestCase {
|
||||
public void testContactRemovedEvent() {
|
||||
ContactRemovedEvent event = new ContactRemovedEvent(contactId);
|
||||
|
||||
context.checking(new DbExpectations() {{
|
||||
context.checking(new Expectations() {{
|
||||
oneOf(transportKeyManager).removeContact(contactId);
|
||||
}});
|
||||
|
||||
|
||||
@@ -75,10 +75,8 @@ class RevealContactsControllerImpl extends DbControllerImpl
|
||||
@DatabaseExecutor
|
||||
private Collection<RevealableContactItem> getItems(GroupId g,
|
||||
Collection<ContactId> selection) throws DbException {
|
||||
Collection<GroupMember> members =
|
||||
groupManager.getMembers(g);
|
||||
Collection<Contact> contacts =
|
||||
contactManager.getContacts();
|
||||
Collection<GroupMember> members = groupManager.getMembers(g);
|
||||
Collection<Contact> contacts = contactManager.getContacts();
|
||||
Collection<RevealableContactItem> items =
|
||||
new ArrayList<>(members.size());
|
||||
for (GroupMember m : members) {
|
||||
|
||||
@@ -432,22 +432,20 @@ class IntroduceeProtocolEngine
|
||||
|
||||
Map<TransportId, TransportKeySetId> keys = null;
|
||||
try {
|
||||
contactManager
|
||||
.addContact(txn, s.getRemote().author, localAuthor.getId(),
|
||||
false);
|
||||
contactManager.addContact(txn, s.getRemote().author,
|
||||
localAuthor.getId(), false);
|
||||
|
||||
// Only add transport properties and keys when the contact was added
|
||||
// This will be changed once we have a way to reset state for peers
|
||||
// that were contacts already at some point in the past.
|
||||
Contact c = contactManager
|
||||
.getContact(txn, s.getRemote().author.getId(),
|
||||
localAuthor.getId());
|
||||
Contact c = contactManager.getContact(txn,
|
||||
s.getRemote().author.getId(), localAuthor.getId());
|
||||
|
||||
// add the keys to the new contact
|
||||
//noinspection ConstantConditions
|
||||
keys = keyManager
|
||||
.addContact(txn, c.getId(), new SecretKey(s.getMasterKey()),
|
||||
timestamp, s.getLocal().alice, false);
|
||||
keys = keyManager.addContact(txn, c.getId(),
|
||||
new SecretKey(s.getMasterKey()), timestamp,
|
||||
s.getLocal().alice, false);
|
||||
|
||||
// add signed transport properties for the contact
|
||||
//noinspection ConstantConditions
|
||||
|
||||
@@ -91,8 +91,7 @@ public class BlogManagerImplTest extends BriarTestCase {
|
||||
public BlogManagerImplTest() {
|
||||
MetadataParser metadataParser = context.mock(MetadataParser.class);
|
||||
blogManager = new BlogManagerImpl(db, contactManager, identityManager,
|
||||
clientHelper,
|
||||
metadataParser, blogFactory, blogPostFactory);
|
||||
clientHelper, metadataParser, blogFactory, blogPostFactory);
|
||||
|
||||
localAuthor1 = getLocalAuthor();
|
||||
localAuthor2 = getLocalAuthor();
|
||||
|
||||
Reference in New Issue
Block a user