Rewrite AutocryptHeader and AutocryptGossipHeader in Kotlin instead of Java#9759
Merged
rafaeltonholo merged 5 commits intothunderbird:mainfrom Sep 9, 2025
Merged
Conversation
5df8f46 to
b6e9469
Compare
rafaeltonholo
requested changes
Sep 9, 2025
Member
rafaeltonholo
left a comment
There was a problem hiding this comment.
Thanks for this contribution, there is just one point to address (spread operator) before merging this.
legacy/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.kt
Outdated
Show resolved
Hide resolved
legacy/core/src/main/java/com/fsck/k9/autocrypt/AutocryptHeader.kt
Outdated
Show resolved
Hide resolved
b6e9469 to
58d7c4d
Compare
rafaeltonholo
approved these changes
Sep 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AutocryptHeader.kt:toRawHeaderString()method builds the header string with support for folding base64 key data.equals()andhashCode()methods based on Kotlin's conventions.createFoldedBase64KeyData()method for formattingAutocryptGossipHeader.kt:toRawHeaderString()method similar to AutocryptHeaderAutocryptOperations.javato accommodate Kotlin properties instead of Java getters: moved fromautocryptHeader.getKeyData()to Kotlin-style property accessautocryptHeader.keyData, and similarly for other fieldsAutocryptHeaderParserTest.javato reflect Kotlin property access instead of Java getter methods, ensuring test compatibility:autocryptHeader.getAddr(), .getKeyData(), .getParameters()with Kotlin property access autocryptHeader.addr, .keyData, .parameters