mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +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);
|
throw new DbException(e);
|
||||||
}
|
}
|
||||||
if (m.getSessionId() == null) {
|
if (m.getSessionId() == null) {
|
||||||
// this can only be an unhandled REQUEST message
|
// This can only be an unhandled REQUEST message.
|
||||||
// that does not yet have a SessionId assigned
|
// Its session is created and stored in incomingMessage(),
|
||||||
continue;
|
// 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
|
// get session from map or database
|
||||||
DeletableSession session = sessions.get(m.getSessionId());
|
DeletableSession session = sessions.get(m.getSessionId());
|
||||||
|
|||||||
@@ -1349,11 +1349,6 @@ public class IntroductionIntegrationTest
|
|||||||
assertFalse(deleteAllMessages0From2());
|
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
|
@Test
|
||||||
public void testDeletingOneSideOfSession() throws Exception {
|
public void testDeletingOneSideOfSession() throws Exception {
|
||||||
addListeners(false, false);
|
addListeners(false, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user