Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Migrate Internal Config class to kotlin #538

Open
wants to merge 2 commits into
base: blackout-2024
Choose a base branch
from

Conversation

Mansi-mParticle
Copy link
Collaborator

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • Migrate internal package’s MPUtility classe to Kotlin.

Testing Plan

  • Was this tested locally? If not, explain why.
  • Tested with sample application and ran the unit test cases

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@Mansi-mParticle Mansi-mParticle force-pushed the refactor/SQDSDKS-6708-Configmanager-class branch from 5de2f41 to 3a5292e Compare February 5, 2025 21:51
Copy link
Contributor

@einsteinx2 einsteinx2 left a comment

Choose a reason for hiding this comment

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

Couple of questions, otherwise looks good

Comment on lines +524 to +528
open val apiKey: String
get() = sPreferences?.getString(Constants.PrefKeys.API_KEY, null) ?: ""

open val apiSecret: String
get() = sPreferences?.getString(Constants.PrefKeys.API_SECRET, null) ?: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice in the original Java we return null for both of these if it's not stored. Should these properties be nullable and return null instead of an empty string? Are there any null checks in other places that assume this can return null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is returning null it breaking lot's of existing code and test cases so decide to keep this as non null

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