Skip to content

fix: Avoid IO in initializer#757

Merged
tevincent merged 1 commit intomainfrom
quick-fix
May 5, 2026
Merged

fix: Avoid IO in initializer#757
tevincent merged 1 commit intomainfrom
quick-fix

Conversation

@tevincent
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

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 PR aims to avoid potentially expensive filesDir access during object initialization by deferring the computation of “last synced” key paths until first use.

Changes:

  • Switched lastSyncedKeyDir from eager initialization to by lazy { ... } in two managers.
  • Updated the file header product name string in the same two files.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Notifications/Registration/src/main/kotlin/NotificationsRegistrationManager.kt Defers filesDir-derived path initialization via lazy; also updates header string.
CrossAppLogin/Back/src/main/kotlin/com/infomaniak/core/crossapplogin/back/internal/deviceinfo/DeviceInfoUpdateManager.kt Defers filesDir-derived path initialization via lazy; also updates header string.

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

Comment thread Notifications/Registration/src/main/kotlin/NotificationsRegistrationManager.kt Outdated
@tevincent tevincent changed the title fix: Avoid IO initializer fix: Avoid IO in initializer May 5, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

@tevincent tevincent merged commit e8973e1 into main May 5, 2026
9 checks passed
@tevincent tevincent deleted the quick-fix branch May 5, 2026 07:37
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.

3 participants