-
Notifications
You must be signed in to change notification settings - Fork 459
NetHttpTransport.trustCertificates
ignores result of SslUtils.initSslContext
#1710
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
Comments
The Javadoc doesn't explain the return value. The implementation does return the instance sslContext passed as argument. google-http-java-client/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Line 130 in 17bbfc1
Annotating the initSslContext with Note that this library must work with Java 7 as per README.md. -> error_prone_annotations artifact version 2.15.0 is compiled targeting Java 7 (pom.xml). Good. Related: http://yaqs/1089314756940005376 |
I am all in favor of running Error Prone in more places :) But FYI, this particular check runs in a stricter mode in the monorepo than it does externally. So you wouldn't see this error externally even if you were running Error Prone there :\ |
(Also: You could consider disabling this check (or any other check) for your directory tree in the monorepo. Of course, the hope is that such checks are normally, well, useful. But I can see how the CheckReturnValue check in particular could lead to difficulties as we make it more strict in the monorepo. Still, I'm cautiously optimistic that it will be OK for you to continue to run there.) |
In the monorepo, this blocks the build from succeeding. Fixes googleapis#1710.
In the monorepo, this blocks the build from succeeding. Fixes googleapis#1710.
In the monorepo, this blocks the build from succeeding. Fixes googleapis#1710.
In the Google monorepo, this was blocking the build from succeeding. Fixes #1710.
https://github.com/googleapis/google-http-java-client/blob/main/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java#L317
In the monorepo, this fails to compile.
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 anSSLContext
that was passed in as a variable? Chaining? DoesinitSslContext
guarantee that the returned context is always the passed in context?The text was updated successfully, but these errors were encountered: