Skip to content

8376033: [lworld] Remove auto early construction from strict fields#1952

Closed
liach wants to merge 5 commits intoopenjdk:lworldfrom
liach:test/strict-out
Closed

8376033: [lworld] Remove auto early construction from strict fields#1952
liach wants to merge 5 commits intoopenjdk:lworldfrom
liach:test/strict-out

Conversation

@liach
Copy link
Copy Markdown
Member

@liach liach commented Jan 22, 2026

This is the 1st PR in the strict removal series. See #1951 for 2nd PR.

Remove the translation strategy change of javac from @Strict, and fix all resulting errors (which appear as verification error for class files).

This is a prerequisite for simplifying @Strict @NullRestricted to @NullRestricted later.

This is done by discovering @Strict fields that are:

  1. Not a member of a value class
  2. Not static

And use IDE refactor to move their initializer to the constructor, and add a super() call in the end of the constructor.


Progress

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

Issue

  • JDK-8376033: [lworld] Remove auto early construction from strict fields (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1952

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1952.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Jan 22, 2026

👋 Welcome back liach! A progress list of the required criteria for merging this PR into lworld 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
Copy Markdown

openjdk Bot commented Jan 22, 2026

@liach 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:

8376033: [lworld] Remove auto early construction from strict fields

Reviewed-by: vromero

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 6 new commits pushed to the lworld branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

@openjdk openjdk Bot changed the title 8376033 8376033: [lworld] Remove auto early construction from strict fields Jan 22, 2026
@openjdk openjdk Bot added the rfr Pull request is ready for review label Jan 22, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Jan 22, 2026

Webrevs

@dansmithcode
Copy link
Copy Markdown
Collaborator

Oh, I was thinking the bulk adjustment to test constructors would come later, but this works too. From a high level point of view, doesn't look as bad as I thought it would be. :-)

@liach
Copy link
Copy Markdown
Member Author

liach commented Jan 22, 2026

If we defer constructor adjustment to after @Strict and @NullRestricted merger, we would need javac to start dealing with @NullRestricted which IMO is more complicated. Will remove the temporary Flags.MARK_STRICT_INIT when we remove @Strict completely.

Copy link
Copy Markdown
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

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

lgtm

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jan 26, 2026
@liach
Copy link
Copy Markdown
Member Author

liach commented Jan 27, 2026

Thanks for the reviews!

/integrate

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jan 27, 2026

Going to push as commit c259bd4.
Since your change was applied there have been 9 commits pushed to the lworld branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jan 27, 2026
@openjdk openjdk Bot closed this Jan 27, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 27, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jan 27, 2026

@liach Pushed as commit c259bd4.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants