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

fix: create mutable copy of JSON serialisation object #479

Conversation

1abhishekpandey
Copy link
Contributor

@1abhishekpandey 1abhishekpandey commented Mar 11, 2024

Description

  • When someone calls the 'identify' event twice with the same userId and externalId (having the type field the same), then an error is thrown. The RSUtils.deserialise() method returns an immutable object for the externalId type, and when the code attempts to modify that immutable object, an error is thrown.
  • Now we've made changes to allow the RSUtils.deserialise() to return the mutable object.
  • Also, added a unit test case to simulate this scenario.

I've refactored the code to fix this merging issue.

Copy link

sonarcloud bot commented Mar 11, 2024

@1abhishekpandey 1abhishekpandey merged commit 95704e1 into develop Mar 11, 2024
16 checks passed
@1abhishekpandey 1abhishekpandey deleted the fix/sdk-1406-fix-merging-of-externalid-in-identify-event branch March 11, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants