diff options
author | Kiwon Park <kiwonp@google.com> | 2023-08-10 01:36:47 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-08-10 01:36:47 +0000 |
commit | 89b71489410f4fc9342a78c23f600bab5081f926 (patch) | |
tree | f3327982ce2a09618da658a61d2cd443e773536d | |
parent | a2fddfa6e59162f7f24ba1341bbfab79d040756c (diff) | |
parent | 194c888a29766a7ebd373f8d9ad4981f7a016734 (diff) | |
download | service_entitlement-89b71489410f4fc9342a78c23f600bab5081f926.tar.gz |
Add CanIgnoreReturnValue annotation to HTTP Request Builder am: ca8e83ebd5 am: b5e895a3d3 am: 194c888a29
Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/service_entitlement/+/2700293
Change-Id: Ie8a1835a52da0949866fbfed299456a1c29acd07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | java/com/android/libraries/entitlement/http/HttpRequest.java | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -22,6 +22,7 @@ java_defaults { libs: [ "androidx.annotation_annotation", "auto_value_annotations", + "error_prone_annotations", ], plugins: ["auto_value_plugin"], sdk_version: "system_current", diff --git a/java/com/android/libraries/entitlement/http/HttpRequest.java b/java/com/android/libraries/entitlement/http/HttpRequest.java index 57b5561..ec5ca7a 100644 --- a/java/com/android/libraries/entitlement/http/HttpRequest.java +++ b/java/com/android/libraries/entitlement/http/HttpRequest.java @@ -26,6 +26,7 @@ import com.android.libraries.entitlement.CarrierConfig; import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableListMultimap; import com.google.common.net.HttpHeaders; +import com.google.errorprone.annotations.CanIgnoreReturnValue; import org.json.JSONObject; @@ -74,6 +75,7 @@ public abstract class HttpRequest { abstract ImmutableListMultimap.Builder<String, String> requestPropertiesBuilder(); /** Adds an HTTP header field. */ + @CanIgnoreReturnValue public Builder addRequestProperty(String key, String value) { requestPropertiesBuilder().put(key, value); return this; @@ -84,6 +86,7 @@ public abstract class HttpRequest { * {@link #addRequestProperty(String, String)} multiple times with the same key and * one value at a time. */ + @CanIgnoreReturnValue public Builder addRequestProperty(String key, List<String> value) { requestPropertiesBuilder().putAll(key, value); return this; |