-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers #19555
Conversation
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
@jaikiran This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
src/jdk.httpserver/share/classes/sun/net/httpserver/UnmodifiableHeaders.java
Outdated
Show resolved
Hide resolved
…leHeaders.java Co-authored-by: Daniel Fuchs <67001856+dfuch@users.noreply.github.com>
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.
LGTM
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.
Looks fine.
Thank you Daniel and Michael for the reviews. CI tier tests came back fine. I'll go ahead with the integration shortly. |
/integrate |
Going to push as commit 6882b38.
Your commit was automatically rebased without conflicts. |
Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8333590?
As noted in that issue the
sun.net.httpserver.UnmodifiableHeaders
, an internal class, within thejdk.httpserver
module doesn't override thetoString()
method.UnmodifiableHeaders
is of typecom.sun.net.httpserver.Headers
which is a public API in thejdk.httpserver
module.When applications call
Headers.toString()
, if the instance is of typeUnmodifiableHeaders
, then the returnedString
representation shows empty headers, even when it isn't empty. The commit in this PR fixes the issue by implementingtoString()
in theUnmodifiableHeaders
to return the correct representation of the headers.An existing jtreg test has been updated to reproduce this issue and verify the fix.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19555/head:pull/19555
$ git checkout pull/19555
Update a local copy of the PR:
$ git checkout pull/19555
$ git pull https://git.openjdk.org/jdk.git pull/19555/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19555
View PR using the GUI difftool:
$ git pr show -t 19555
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19555.diff
Webrev
Link to Webrev Comment