-
Notifications
You must be signed in to change notification settings - Fork 6.3k
7105350: HttpExchange's attributes are the same as HttpContext's attributes #27652
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back SentryMan! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@SentryMan The following label will be automatically applied to this pull request:
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. |
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.
Probably need a test for this as well
private static final boolean perExchangeAttributes = | ||
!System.getProperty("jdk.httpserver.attributes", "") | ||
.equals("context"); |
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.
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?
throw new NullPointerException("null name parameter"); | ||
} | ||
if (attributes == null) { | ||
attributes = getHttpContext().getAttributes(); | ||
} | ||
return attributes.get (name); | ||
return attributes.get(name); |
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.
Consider replacing this with Objects.requireNonNull
} | ||
if (attributes == null) { | ||
attributes = getHttpContext().getAttributes(); | ||
throw new NullPointerException("null name parameter"); |
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.
As above
Now ExchangeImpl will default to having a separate attribute map for the request duration.
Progress
Issue
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