Skip to content

Conversation

SentryMan
Copy link

@SentryMan SentryMan commented Oct 6, 2025

Now ExchangeImpl will default to having a separate attribute map for the request duration.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-7105350: HttpExchange's attributes are the same as HttpContext's attributes (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27652/head:pull/27652
$ git checkout pull/27652

Update a local copy of the PR:
$ git checkout pull/27652
$ git pull https://git.openjdk.org/jdk.git pull/27652/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27652

View PR using the GUI difftool:
$ git pr show -t 27652

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27652.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 6, 2025

👋 Welcome back SentryMan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 6, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Oct 6, 2025

@SentryMan The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 6, 2025
@mlbridge
Copy link

mlbridge bot commented Oct 6, 2025

Webrevs

Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need a test for this as well

Comment on lines +63 to +65
private static final boolean perExchangeAttributes =
!System.getProperty("jdk.httpserver.attributes", "")
.equals("context");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property will have to be documented somewhere such as the jdk.httpserver module-info. But, I'm wondering if fairly obscure properties like this might be better off "buried" in the net.properties config file. I think there's a case for putting all such "compatibility" flags somewhere out of the way like that. If we were to do that, you would need to access the property using sun.net.NetProperties.

Any other views on this?

Comment on lines +372 to +374
throw new NullPointerException("null name parameter");
}
if (attributes == null) {
attributes = getHttpContext().getAttributes();
}
return attributes.get (name);
return attributes.get(name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing this with Objects.requireNonNull

}
if (attributes == null) {
attributes = getHttpContext().getAttributes();
throw new NullPointerException("null name parameter");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants