-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Currently, AutocryptHeaderParser
and AutocryptGossipHeaderParser
are implemented in Java. For better Kotlin interoperability and idiomatic code, both classes should be converted to Kotlin with the following improvements:
- Convert both classes from Java to Kotlin.
- Maintain singleton pattern using private constructor + companion object.
- Use idiomatic Kotlin features:
when
expressions for validationmapNotNull
instead of manual loops- Null safety (?., ?:, etc.)
- Avoid redundant operations (e.g., Base64 decoding)
- Logging should be consistent using a dedicated TAG constant.
parseAllAutocryptHeaders
/parseAllAutocryptGossipHeaders
should acceptCollection<String>
for flexibility.- Preserve existing functionality and validation rules.
- Add
@VisibleForTesting
annotations to parsing functions where applicable.
Metadata
Metadata
Assignees
Labels
No labels