mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
[core] throw AssertionError if SessionId is missing
Also remove stale comment
This commit is contained in:
@@ -583,9 +583,11 @@ class IntroductionManagerImpl extends ConversationClientImpl
|
||||
throw new DbException(e);
|
||||
}
|
||||
if (m.getSessionId() == null) {
|
||||
// this can only be an unhandled REQUEST message
|
||||
// that does not yet have a SessionId assigned
|
||||
continue;
|
||||
// This can only be an unhandled REQUEST message.
|
||||
// Its session is created and stored in incomingMessage(),
|
||||
// and getMessageMetadata() only returns delivered messages,
|
||||
// so the session ID should have been assigned.
|
||||
throw new AssertionError("missing session ID");
|
||||
}
|
||||
// get session from map or database
|
||||
DeletableSession session = sessions.get(m.getSessionId());
|
||||
|
||||
@@ -1349,11 +1349,6 @@ public class IntroductionIntegrationTest
|
||||
assertFalse(deleteAllMessages0From2());
|
||||
}
|
||||
|
||||
/**
|
||||
* This test is testing that a session's deletable flag gets reset
|
||||
* when the session is used again,
|
||||
* so that it can not cause a session to get deleted prematurely.
|
||||
*/
|
||||
@Test
|
||||
public void testDeletingOneSideOfSession() throws Exception {
|
||||
addListeners(false, false);
|
||||
|
||||
Reference in New Issue
Block a user