Skip to content

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

Closed

Conversation

liach
Copy link
Member

@liach liach commented May 6, 2023

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

  • 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-8307575: Migrate the serialization constructor accessors to Method Handles (Enhancement - P4)

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 6, 2023

👋 Welcome back liach! 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 openjdk bot added the rfr Pull request is ready for review label May 6, 2023
@openjdk
Copy link

openjdk bot commented May 6, 2023

@liach The following labels will be automatically applied to this pull request:

  • core-libs
  • security

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.

@openjdk openjdk bot added security security-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels May 6, 2023
@mlbridge
Copy link

mlbridge bot commented May 6, 2023

Webrevs

@wangweij
Copy link
Contributor

/label remove security

@openjdk openjdk bot removed the security security-dev@openjdk.org label May 31, 2023
@openjdk
Copy link

openjdk bot commented May 31, 2023

@wangweij
The security label was successfully removed.

@openjdk
Copy link

openjdk bot commented Jun 15, 2023

@liach this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

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

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Jun 15, 2023
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Jun 26, 2023
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 24, 2023

@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!

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 22, 2023

@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 /open pull request command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants