-
Notifications
You must be signed in to change notification settings - Fork 48
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
Null pointer fix #423
Conversation
fda91cb
to
b76314e
Compare
b76314e
to
3f536f6
Compare
libtelemetry/src/full/java/com/mapbox/android/telemetry/MapboxTelemetry.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ 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()) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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(..)
There was a problem hiding this comment.
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.
Approved, could you rebase and merge? Thanks! |
01f58c9
to
e977ddb
Compare
PR fixes issue 424