Integrated: 8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers
Jaikiran Pai
jpai at openjdk.org
Wed Jun 5 14:07:02 UTC 2024
On Wed, 5 Jun 2024 10:42:15 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> 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 the `jdk.httpserver` module doesn't override the `toString()` method. `UnmodifiableHeaders` is of type `com.sun.net.httpserver.Headers` which is a public API in the `jdk.httpserver` module.
>
> When applications call `Headers.toString()`, if the instance is of type `UnmodifiableHeaders`, then the returned `String` representation shows empty headers, even when it isn't empty. The commit in this PR fixes the issue by implementing `toString()` in the `UnmodifiableHeaders` to return the correct representation of the headers.
>
> An existing jtreg test has been updated to reproduce this issue and verify the fix.
This pull request has now been integrated.
Changeset: 6882b381
Author: Jaikiran Pai <jpai at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6882b381e8662b5c134d3a1868c357eeb3523ea8
Stats: 77 lines in 2 files changed: 64 ins; 1 del; 12 mod
8333590: UnmodifiableHeaders.toString() returns a value that represents empty headers
Reviewed-by: dfuchs, michaelm
-------------
PR: https://git.openjdk.org/jdk/pull/19555
More information about the net-dev
mailing list