From a2c0ae3295922030181738470ac5bfda643a3ed5 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 6 Jun 2022 08:08:30 -0700 Subject: [PATCH] api: Document Attributes.Key uses reference equality The text here should be expanded once `keys()` is removed. But for now this at least can make it clearer that the current behavior is on purpose. The text here is the same as that in CallOptions.Key. See https://github.com/grpc/grpc-java/issues/1764#issuecomment-1144935608 --- api/src/main/java/io/grpc/Attributes.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/io/grpc/Attributes.java b/api/src/main/java/io/grpc/Attributes.java index 26c2a72f90..461ed04d38 100644 --- a/api/src/main/java/io/grpc/Attributes.java +++ b/api/src/main/java/io/grpc/Attributes.java @@ -110,7 +110,8 @@ public final class Attributes { } /** - * Key for an key-value pair. + * Key for an key-value pair. Uses reference equality. + * * @param type of the value in the key-value pair */ @Immutable