Document equals and hashCode on Status
diff --git a/core/src/main/java/io/grpc/Status.java b/core/src/main/java/io/grpc/Status.java
index 37208fb..96d6b29 100644
--- a/core/src/main/java/io/grpc/Status.java
+++ b/core/src/main/java/io/grpc/Status.java
@@ -459,4 +459,24 @@
return fromCodeValue(Integer.valueOf(serialized));
}
}
+
+ /**
+ * Equality on Statuses is not well defined. Instead, do comparison based on their Code with
+ * {@link #getCode}. The description and cause of the Status are unlikely to be stable, and
+ * additional fields may be added to Status in the future.
+ */
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ /**
+ * Hash codes on Statuses are not well defined.
+ *
+ * @see #equals
+ */
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
}