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 #2090: avoid bang bang operator in networkinterceptor #2091

Merged
merged 2 commits into from
Nov 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class NetworkInterceptor @Inject constructor() : Interceptor {
val response = chain.proceed(request)

if (response.code() == Constants.HTTP_OK) {
if (response.body() != null) {
var rawJson = response.body()!!.string()
response.body()?.let {
var rawJson = it.string()
aggarwalpulkit596 marked this conversation as resolved.
Show resolved Hide resolved
rawJson = removeXSSIPrefix(rawJson)
val contentType = response.body()!!.contentType()
val contentType = it.contentType()
val body = ResponseBody.create(contentType, rawJson)
return response.newBuilder().body(body).build()
}
Expand Down