-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8350279: HttpClient: Add a new HttpResponse method to identify connections #24154
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back vyazici! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
test/jdk/java/net/httpclient/HttpResponseConnectionLabelTest.java
Outdated
Show resolved
Hide resolved
test/jdk/java/net/httpclient/HttpResponseConnectionLabelTest.java
Outdated
Show resolved
Hide resolved
src/java.net.http/share/classes/jdk/internal/net/http/HttpResponseImpl.java
Outdated
Show resolved
Hide resolved
src/java.net.http/share/classes/jdk/internal/net/http/HttpResponseImpl.java
Outdated
Show resolved
Hide resolved
src/java.net.http/share/classes/jdk/internal/net/http/HttpResponseImpl.java
Outdated
Show resolved
Hide resolved
src/java.net.http/share/classes/jdk/internal/net/http/HttpResponseImpl.java
Outdated
Show resolved
Hide resolved
/csr required |
This new API returns an
|
…nectionLabel` Co-authored-by: Daniel Fuchs <[email protected]>
…nectionLabelTest`
/csr needed |
@vy has indicated that a compatibility and specification (CSR) request is needed for this pull request. @vy please create a CSR request for issue JDK-8350279 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
No. If empty is returned you can make no assumptions. In practice this should never be null with our impl (except possibly in whitebox tests)
Yes. |
Should we specify this, like "The JDK built-in implementation of the {@code HttpClient} always assign a label to connections it create"? |
Good question - that would be an |
* <p> | ||
* The format of the string is opaque, but the content should be unique | ||
* for the lifetime of the {@link HttpClient} instance. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the wording to something like:
The format of the string is opaque, but the value will be fixed and unique for any connection, for the lifetime of its {@link HttpClient instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
The format of the string is opaque, but the value is fixed and unique for any connection in the scope of the associated {@link HttpClient} instance.
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 withHttpConnection::id
. This distinction is explained in the JavaDoc of both properties.Progress
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24154/head:pull/24154
$ git checkout pull/24154
Update a local copy of the PR:
$ git checkout pull/24154
$ git pull https://git.openjdk.org/jdk.git pull/24154/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24154
View PR using the GUI difftool:
$ git pr show -t 24154
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24154.diff
Using Webrev
Link to Webrev Comment