Skip to content

Commit

Permalink
fix: add @CanIgnoreReturnValue to avoid errorprone errors (#1716)
Browse files Browse the repository at this point in the history
In the Google monorepo, this was blocking the build from succeeding.

Fixes #1710.
  • Loading branch information
Capstan authored Sep 1, 2022
1 parent 9efcb14 commit cba2f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google-http-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

package com.google.api.client.util;

import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.NoSuchAlgorithmException;
Expand Down Expand Up @@ -101,6 +102,7 @@ public static KeyManagerFactory getPkixKeyManagerFactory() throws NoSuchAlgorith
* #getPkixTrustManagerFactory()})
* @since 1.14
*/
@CanIgnoreReturnValue
public static SSLContext initSslContext(
SSLContext sslContext, KeyStore trustStore, TrustManagerFactory trustManagerFactory)
throws GeneralSecurityException {
Expand Down

0 comments on commit cba2f82

Please sign in to comment.