Uh oh!
There was an error while loading. Please reload this page.
Feature/no connection serial recovery key - #980
Conversation
…n-serial-recovery-key
229617e to
1509938Compare6461967 to
72992c9CompareUh oh!
There was an error while loading. Please reload this page.
| public RecoveryKeyContext(String connectionKey, long msgSerial, Map<String, String> channelSerials) { | ||
| this.connectionKey = connectionKey; | ||
| this.msgSerial = msgSerial; | ||
| this.channelSerials.putAll(channelSerials); |
There was a problem hiding this comment.
Out of curiosity, why do we copy channelSerials?
There was a problem hiding this comment.
General principal of immutability. We have marked channelSerials field as immutable, so it shouldn't get influenced by
changes in external channelserials and should only capture snapshot of serials at the time of creating the instance.
There was a problem hiding this comment.
Got you! (one more point to rewrite lib in Kotlin) I personally prefer using analog of guava's ImmutableMap which just wraps around existing Map rather than make Map's copy. But it this particular code probably no harm to copy
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Related #974
Related #846
Related #976