Skip to content

Conversation

@sormuras
Copy link
Member

@sormuras sormuras commented Nov 13, 2025

Please review this change to synchronize the behaviour in java's source launch mode to fail when a non-arg constructor with private access modifier is defined - like it does in class launch mode.

Find the prior-art check performed in class launch mode at LauncherHelper.java#L958-L961:

Constructor<?> constructor = mainClass.getDeclaredConstructor();
if (Modifier.isPrivate(constructor.getModifiers())) {
    abort(null, "java.launcher.cls.error6", className);
}

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change requires CSR request JDK-8371829 to be approved
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8371470: Java Launcher does not fail when running compact java-file with private no-arg constructor (Bug - P4)
  • JDK-8371829: Java Launcher does not fail when running compact java-file with private no-arg constructor (CSR)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28291

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28291.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2025

👋 Welcome back cstein! 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
Copy link

openjdk bot commented Nov 13, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Nov 13, 2025

@sormuras The following label will be automatically applied to this pull request:

  • compiler

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.

@sormuras sormuras marked this pull request as ready for review November 13, 2025 15:54
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 13, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2025

Webrevs

@jddarcy
Copy link
Member

jddarcy commented Nov 13, 2025

/csr needed

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Nov 13, 2025
@openjdk
Copy link

openjdk bot commented Nov 13, 2025

@jddarcy has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@sormuras please create a CSR request for issue JDK-8371470 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

Copy link
Contributor

@ammbra ammbra left a comment

Choose a reason for hiding this comment

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

Thank you for solving this issue, Christian 🙏 . While not directly related to the core issue of this bug, could you also please check my comment?

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

Labels

compiler [email protected] csr Pull request needs approved CSR before integration rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants