Skip to content

Commit cba2f82

Browse files
authored
fix: add @CanIgnoreReturnValue to avoid errorprone errors (#1716)
In the Google monorepo, this was blocking the build from succeeding. Fixes #1710.
1 parent 9efcb14 commit cba2f82

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

google-http-client/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
<groupId>com.google.code.findbugs</groupId>
136136
<artifactId>jsr305</artifactId>
137137
</dependency>
138+
<dependency>
139+
<groupId>com.google.errorprone</groupId>
140+
<artifactId>error_prone_annotations</artifactId>
141+
</dependency>
138142
<dependency>
139143
<groupId>com.google.guava</groupId>
140144
<artifactId>guava</artifactId>

google-http-client/src/main/java/com/google/api/client/util/SslUtils.java

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
package com.google.api.client.util;
1616

17+
import com.google.errorprone.annotations.CanIgnoreReturnValue;
1718
import java.security.GeneralSecurityException;
1819
import java.security.KeyStore;
1920
import java.security.NoSuchAlgorithmException;
@@ -101,6 +102,7 @@ public static KeyManagerFactory getPkixKeyManagerFactory() throws NoSuchAlgorith
101102
* #getPkixTrustManagerFactory()})
102103
* @since 1.14
103104
*/
105+
@CanIgnoreReturnValue
104106
public static SSLContext initSslContext(
105107
SSLContext sslContext, KeyStore trustStore, TrustManagerFactory trustManagerFactory)
106108
throws GeneralSecurityException {

0 commit comments

Comments
 (0)