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

Null pointer fix #423

Merged
merged 2 commits into from
Nov 21, 2019
Merged

Null pointer fix #423

merged 2 commits into from
Nov 21, 2019

Conversation

korshaknn
Copy link
Contributor

@korshaknn korshaknn commented Aug 15, 2019

PR fixes issue 424

@codecov
Copy link

codecov bot commented Oct 8, 2019

Codecov Report

Merging #423 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #423      +/-   ##
============================================
+ Coverage     68.23%   68.25%   +0.01%     
+ Complexity      383      382       -1     
============================================
  Files            68       68              
  Lines          2084     2079       -5     
  Branches        163      163              
============================================
- Hits           1422     1419       -3     
+ Misses          571      570       -1     
+ Partials         91       90       -1

public void setBaseUrl(String eventsHost) {
if (isValidUrl(eventsHost)) {
public synchronized boolean setBaseUrl(String eventsHost) {
if (isValidUrl(eventsHost) && checkNetworkAndParameters()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need to check for network here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TelemetryClient is created inside that check. It's a pipeline used by MapboxTelemetry class to init TelemetryClient

Copy link
Contributor

Choose a reason for hiding this comment

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

checkNetworkAndParameters() checks for both network connection and init as required, so if you need the network check then this is fine, if the intent is to check and init TelemetryClient then you could checkRequiredParameters(..)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we discussed it internally and decided to check network connection as well.

@nkukday
Copy link
Contributor

nkukday commented Nov 20, 2019

Approved, could you rebase and merge? Thanks!

@korshaknn korshaknn merged commit ea30f94 into master Nov 21, 2019
@korshaknn korshaknn deleted the fix-crash-on-telemetry-client branch November 21, 2019 08:57
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.

None yet

4 participants