Skip to content

Commit 2d7152b

Browse files
committed
Add @CanIgnoreReturnValue to avoid errorprone errors.
In the monorepo, this blocks the build from succeeding. Fixes #1710.
1 parent 9efcb14 commit 2d7152b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

google-http-client/pom.xml

Lines changed: 4 additions & 0 deletions
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/http/javanet/NetHttpTransport.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.google.api.client.util.Preconditions;
2121
import com.google.api.client.util.SecurityUtils;
2222
import com.google.api.client.util.SslUtils;
23+
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2324
import java.io.IOException;
2425
import java.io.InputStream;
2526
import java.net.HttpURLConnection;

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

Lines changed: 2 additions & 0 deletions
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)