-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8307575: Migrate the serialization constructor accessors to Method Handles #13853
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
Conversation
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
/label remove security |
@wangweij |
@liach this pull request can not be integrated into git checkout explore/mh-serial-constructor
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@liach This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
Apparently method handle linking doesn't impose extra checks on constructor invocation, so the special logic for the serialization constructor to call superclass constructor in MagicAccessorImpl can be removed altogether with old core reflection implementation.
Serialization and sun.reflect.ReflectionFactory tests pass. May be worth to think about the long-term treatment of ReflectionFactory.newConstructorForSerialization, as creating partial object is inherently unsafe, and behavior of
newConstructorForSerialization(ArrayList.class, String.class.getDeclaredConstructor(String.class))
etc. (which is accepted for now) may have unpredictable side effects.#1830 has a similar patch; this one doesn't touch proxies and updates to the new post-JEP 416 reflection implementation.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13853/head:pull/13853
$ git checkout pull/13853
Update a local copy of the PR:
$ git checkout pull/13853
$ git pull https://git.openjdk.org/jdk.git pull/13853/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13853
View PR using the GUI difftool:
$ git pr show -t 13853
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13853.diff
Webrev
Link to Webrev Comment