-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
In the monorepo, this fails to compile.
google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java:317: error: [CheckReturnValue] The result of `initSslContext(...)` must be used
SslUtils.initSslContext(
^
If you really don't want to use the result, then assign it to a variable: `var unused = ...`.
If callers of `initSslContext(...)` shouldn't be required to use its result, then annotate it with `@CanIgnoreReturnValue`.
This is yet another case where if error prone was used and enforced in the external repo, we would not have import issues.
Does this code simply rely on the side effects on the passed in sslContext
? OTOH, why return an SSLContext
that was passed in as a variable? Chaining? Does initSslContext
guarantee that the returned context is always the passed in context?
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.