Skip to content

Commit

Permalink
remove force unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
kenny-statsig committed Sep 13, 2023
1 parent 1206826 commit e91bab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/statsig/androidsdk/ErrorBoundary.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ internal class ErrorBoundary() {

val clientBuilder = OkHttpClient.Builder()

clientBuilder.addInterceptor(RequestHeaderInterceptor(apiKey!!))
clientBuilder.addInterceptor(RequestHeaderInterceptor(apiKey ?: ""))
clientBuilder.addInterceptor(ResponseInterceptor())

val httpClient = clientBuilder.build()
Expand Down
10 changes: 2 additions & 8 deletions src/test/java/com/statsig/androidsdk/AsyncInitVsUpdateTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,8 @@ class AsyncInitVsUpdateTest {
}
}

var elapsed = kotlin.system.measureTimeMillis {
Statsig.initializeAsync(app, "client-key", userA, callback)
}
print("initializeAsync $elapsed")
elapsed = kotlin.system.measureTimeMillis {
Statsig.updateUserAsync(userB, callback)
}
print("updateUserAsync $elapsed")
Statsig.initializeAsync(app, "client-key", userA, callback)
Statsig.updateUserAsync(userB, callback)

// Since updateUserAsync has been called, we void values for user_a
var config = Statsig.getConfig("a_config")
Expand Down

0 comments on commit e91bab3

Please sign in to comment.