-
Notifications
You must be signed in to change notification settings - Fork 6k
8272805: Avoid looking up standard charsets #5210
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
8272805: Avoid looking up standard charsets #5210
Conversation
👋 Welcome back serb! A progress list of the required criteria for merging this PR into |
@mrserb The following labels 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 lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
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 security related change looks fine to me.
@mrserb 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 1 new commit 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 |
@AlanBateman |
src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java
Outdated
Show resolved
Hide resolved
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 good.
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.
Changes to http server look good to me.
Updated as suggested. |
/label remove build |
@magicus |
Can somebody take a look too the changes in the "jdk.attach", "jdk.hotspot.agent" and IdealGraphVisualizer? |
@mrserb Not sure if it applies but there are couple of classes in
would it make sense to go through them as well? |
Most of the cases in the XML module are related to the Xerces library, I have skipped it to make the future merges from upstream of that library simpler. |
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.
Build tool change looks good.
/integrate |
Going to push as commit 7fff22a.
Your commit was automatically rebased without conflicts. |
This is the continuation of JDK-8233884, JDK-8271456, and JDK-8272120.
In many places standard charsets are looked up via their names, for example:
absolutePath.getBytes("UTF-8");
This could be done more efficiently(up to x20 time faster) with use of java.nio.charset.StandardCharsets:
absolutePath.getBytes(StandardCharsets.UTF_8);
The later variant also makes the code cleaner, as it is known not to throw UnsupportedEncodingException in contrary to the former variant.
This change includes:
Some performance discussion: #5063
Code excluded in this fix: the Xerces library(should be fixed upstream), J2DBench(should be compatible to 1.4), some code in the network(the change there are not straightforward, will do it later).
Tested by the tier1/tier2/tier3 tests on Linux/Windows/macOS.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5210/head:pull/5210
$ git checkout pull/5210
Update a local copy of the PR:
$ git checkout pull/5210
$ git pull https://git.openjdk.java.net/jdk pull/5210/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5210
View PR using the GUI difftool:
$ git pr show -t 5210
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5210.diff