On Fri, 21 Mar 2025 13:45:24 GMT, Volkan Yazici <vyaz...@openjdk.org> wrote:
> Adds `HttpResponse::connectionLabel` method that provides an identifier for > the connection. > > **Implementation note:** The feature is facilitated by > `HttpConnection::label`, which should not be confused with > `HttpConnection::id`. This distinction is explained in the JavaDoc of both > properties. This new API returns an `Optional`. 1. Can users make any assumption about the connection identity when it is empty? Such as assuming such connections are all the same (as implied by your use of `orElse(null)` in tests) or all different? 2. If we cannot make any assumption about the empty return value, can users make any assumption that a `HttpResponse` obtained from the JDK built-in `HttpClient` always return non-empty for the label? ------------- PR Comment: https://git.openjdk.org/jdk/pull/24154#issuecomment-2746061424