Skip to content

Don't treat OkHttp Response body as nullable#1202

Merged
mc1arke merged 1 commit intomasterfrom
nullable-response-cleanup
Feb 14, 2026
Merged

Don't treat OkHttp Response body as nullable#1202
mc1arke merged 1 commit intomasterfrom
nullable-response-cleanup

Conversation

@mc1arke
Copy link
Copy Markdown
Owner

@mc1arke mc1arke commented Feb 14, 2026

OkHttp no-longer marks the call to retrieve the body from the response as nullable, so performing null checks or wrapping it in Optional.ofNullable flags alerts during static code analysis. The null checks are therefore being removed and the body being treated as always being present.

OkHttp no-longer marks the call to retrieve the body from the response
as nullable, so performing null checks or wrapping it in
`Optional.ofNullable` flags alerts during static code analysis. The
null checks are therefore being removed and the body being treated as
always being present.
@sonarqubecloud
Copy link
Copy Markdown

@mc1arke mc1arke merged commit 4220932 into master Feb 14, 2026
15 checks passed
@mc1arke mc1arke deleted the nullable-response-cleanup branch February 14, 2026 11:31
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.

1 participant