From 51107d15b081d626ab4f057ee214286911af8db4 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Wed, 31 Aug 2022 18:56:34 -0700 Subject: [PATCH] Add `@CanIgnoreReturnValue` to avoid errorprone errors. In the monorepo, this blocks the build from succeeding. Fixes #1710. --- google-http-client/pom.xml | 4 ++++ .../src/main/java/com/google/api/client/util/SslUtils.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4e23f0acd..b7afce45b 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -135,6 +135,10 @@ com.google.code.findbugs jsr305 + + com.google.errorprone + error_prone_annotations + com.google.guava guava diff --git a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java index 5cb8f373c..a578c7383 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java @@ -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; @@ -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 {