RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v4]
Jaikiran Pai
jpai at openjdk.org
Wed Apr 2 11:03:54 UTC 2025
On Tue, 1 Apr 2025 19:13:36 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> When we close a connection, we take it out of the set. So it's not about ordering the connection but about quickly finding the connection in that set.
>
> It was already a puzzler for me to figure out `id` cannot be used for `label`, and `label` cannot be used for `id` either. Both are due to the fact that `label` can be shared across instances, whereas `id` cannot. In short, I've found it very helpful to thoroughly document their these fields' properties and what they serve for. Unless you have a strong objection, I'd like to keep the current form of documentation.
Hello Volkan, I think having the mention of ordering on the `id` field is OK. I still find it confusing to have this sentence on the `label`:
>
> As a result, compared to {@link #id}, this label does not give a total order among instances.
To me, this feels odd because `label` being a `String` typically wouldn't have been considered to be playing a role in ordering. Plus, in isolation, it's not clear what ordering this talks about (Daniel did explain to me that the `id` field is used in ordering of open connections. I haven't yet looked deeper at that code to see where that happens).
In any case, this is an internal class so if we do decide to use the current proposed text, that's OK with me.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24154#discussion_r2024595837
More information about the net-dev
mailing list