Skip to content

Remove jackson from a few more places#1935

Merged
SessionHero01 merged 2 commits intodevfrom
remove-jackson-sealed-data
Feb 13, 2026
Merged

Remove jackson from a few more places#1935
SessionHero01 merged 2 commits intodevfrom
remove-jackson-sealed-data

Conversation

@SessionHero01
Copy link
Collaborator

@SessionHero01 SessionHero01 commented Feb 13, 2026

Went in to change SealData to use kotlinx serialization, ended up changing these along the way:

  • AttachmentSecret and its provider
  • DatabaseSecretProvider
  • LogSecretProvider

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes Jackson dependencies from the codebase and replaces them with kotlinx.serialization. It also refactors several provider classes from Java to Kotlin with proper dependency injection instead of static singleton patterns.

Changes:

  • Migrated serialization from Jackson to kotlinx.serialization for SealedData and AttachmentSecret classes
  • Converted AttachmentSecretProvider, DatabaseSecretProvider, and LogSecretProvider from Java singletons to Kotlin classes with dependency injection
  • Enhanced PreferenceKey to support JSON serialization with reified type parameters and added support for ByteArray storage
  • Removed deprecated preference storage methods from TextSecurePreferences and migrated to the new PreferenceStorage abstraction

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
BlobUtils.java Updated to access AttachmentSecretProvider from ApplicationContext instead of static getInstance()
SharedPreferenceStorage.kt Added support for Bytes strategy and fixed enum fallback to default value
PreferenceKey.kt Changed json() method to use reified type parameter and added bytes() factory method
LandingActivity.kt Removed unused imports
SignalGlideModule.java Updated to access AttachmentSecretProvider from ApplicationContext
PersistentLogger.kt Updated to inject LogSecretProvider via constructor instead of static access
LogSecretProvider.kt (new) New Kotlin implementation with dependency injection
LogSecretProvider.java (deleted) Removed Java implementation
DatabaseModule.kt Updated to inject AttachmentSecretProvider instead of using static getInstance()
SealedData.kt (new) New Kotlin data class with kotlinx.serialization support
KeyStoreHelper.java Removed inner SealedData class and updated to use new standalone class
IdentityKeyUtil.java Updated references from KeyStoreHelper.SealedData to SealedData
DatabaseSecretProvider.kt (new) New Kotlin implementation with dependency injection
DatabaseSecretProvider.java (deleted) Removed Java implementation
AttachmentSecretProvider.kt (new) New Kotlin implementation with dependency injection
AttachmentSecretProvider.java (deleted) Removed Java implementation
AttachmentSecret.kt (new) New Kotlin data class with kotlinx.serialization support
AttachmentSecret.java (deleted) Removed Java implementation
LoginStateRepository.kt Migrated from SharedPreferences to PreferenceStorage abstraction
LocalEncryptedFileOutputStream.kt Updated to inject AttachmentSecretProvider instead of using static getInstance()
LocalEncryptedFileInputStream.kt Updated to inject AttachmentSecretProvider instead of using static getInstance()
ApplicationContext.kt Added injection for AttachmentSecretProvider
BytesAsCompactB64Serializer.kt (new) New custom serializer for ByteArray using Base64 encoding
TextSecurePreferences.kt Removed deprecated secret management methods that are now handled by dedicated providers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SessionHero01 SessionHero01 merged commit 4090643 into dev Feb 13, 2026
5 checks passed
@SessionHero01 SessionHero01 deleted the remove-jackson-sealed-data branch February 13, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants