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

[Android][FirebaseAnalytics] Adds Null Params Handling to Firebase's logEvent #7897

Merged
merged 1 commit into from Apr 24, 2020

Conversation

thorbenprimke
Copy link
Contributor

Why

The params parameter of logEvent is nullable but it was passed to the
MapArguments constructor which expects a non-null map.
This caused a NPE when the Map’s keySet method is invoked.

How

The fix is to simply pass null to Firebase logEvent method as that
is handled as in no properties are being passed with the event.

Test Plan

Added an additional test case for logEvent to the test suite and observed it failing without the fix and passing after the change.

Copy link
Contributor

@IjzerenHein IjzerenHein left a comment

Choose a reason for hiding this comment

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

This is awesome, thanks for fixing this!
Code looks good 👍
Please update the changelog in package, instead of the global changelog.
Also, please rebase on master, that will probably cause CI to succeed.

CHANGELOG.md Outdated Show resolved Hide resolved
…logEvent

The params parameter of `logEvent` is nullable but it was passed to the
MapArguments constructor which expects a non-null map.
This caused a NPE when the Map’s keySet method is invoked.

The fix is to simply pass null to Firebase `logEvent` method as that
is handled as in no properties are being passed with the event.

Added an additional test case for logEvent to the test suite and observed it failing without the fix and passing after the change.
@thorbenprimke
Copy link
Contributor Author

@IjzerenHein - do I need to do anything else in regards to getting the client and docs CI failures? It looks like the failures are unrelated.

@IjzerenHein IjzerenHein removed the request for review from EvanBacon April 23, 2020 19:37
@IjzerenHein IjzerenHein merged commit 6cf9677 into expo:master Apr 24, 2020
@IjzerenHein
Copy link
Contributor

@IjzerenHein - do I need to do anything else in regards to getting the client and docs CI failures? It looks like the failures are unrelated.

@thorbenprimke No there's nothing to do. We've verified and merged the PR. It will be included in the patch update for SDK 37 that will be released shortly. It has also been released to NPM, v2.3.0 👍

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.

None yet

2 participants