Skip to content

Conversation

@He-Pin
Copy link
Contributor

@He-Pin He-Pin commented Jan 11, 2025

Motivation:
When a user passes a wrong parameter, the current implementation throws an IllegalArgumentException with an error message null, which is not helpful.

Modification:
Add detail error messages.

Result:
Helpful messages.


Progress

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

Issue

  • JDK-8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23050

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Jan 11, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 11, 2025

Hi @He-Pin, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user He-Pin" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Jan 11, 2025

@He-Pin 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:

8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

Reviewed-by: vklang, liach, pminborg

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 2172 new commits pushed to the master 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@viktorklang-ora, @liach, @minborg) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Jan 11, 2025

@He-Pin The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jan 11, 2025
@openjdk
Copy link

openjdk bot commented Jan 11, 2025

@He-Pin Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@He-Pin He-Pin changed the title chore: Add detail error messages when ThreadPoolExecutor's parameter is illegal 9077998: Add detail error messages when ThreadPoolExecutor's parameter is illegal Jan 11, 2025
@openjdk
Copy link

openjdk bot commented Jan 12, 2025

@He-Pin Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@He-Pin He-Pin changed the title 9077998: Add detail error messages when ThreadPoolExecutor's parameter is illegal 8347491: Add detail error messages when ThreadPoolExecutor's parameter is illegal Jan 12, 2025
@He-Pin
Copy link
Contributor Author

He-Pin commented Jan 13, 2025

@viktorklang-ora @AlanBateman @DougLea This PR is a kind of happen before :)

@He-Pin
Copy link
Contributor Author

He-Pin commented Jan 13, 2025

/covered

@bridgekeeper bridgekeeper bot added the oca-verify Needs verification of OCA signatory status label Jan 13, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 13, 2025

Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@He-Pin He-Pin changed the title 8347491: Add detail error messages when ThreadPoolExecutor's parameter is illegal 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message Jan 13, 2025
@TheShermanTanker
Copy link
Contributor

Hang tight, the verification takes a looooooong time, so it might be a while before your work is seen...

@He-Pin
Copy link
Contributor Author

He-Pin commented Jan 18, 2025

I have another PR, I will wait before oca is completed.

@bridgekeeper bridgekeeper bot removed oca Needs verification of OCA signatory status oca-verify Needs verification of OCA signatory status labels Jan 24, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 24, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 24, 2025

Webrevs

@viktorklang-ora
Copy link
Contributor

Hi @He-Pin,

Thanks for your patience here—I've been in catch-up mode.

I didn't know there was already a PR for this issue when I created my PR for the issue, so in order to pick a PR to move forward with, would you prefer that I review your PR or would you rather move forward with the other PR?

Either works for me!

Cheers,

@He-Pin
Copy link
Contributor Author

He-Pin commented Feb 11, 2025

It would be much nicer if you take this one:), we are on JDK 21 and want to have this in the next LTS.

@viktorklang-ora
Copy link
Contributor

@He-Pin Just pinging you here, in case the notification from my most recent comments got lost in transit.

He-Pin and others added 2 commits May 20, 2025 18:50
…torService.java

Co-authored-by: Viktor Klang <viktor.klang@oracle.com>
…torService.java

Co-authored-by: Viktor Klang <viktor.klang@oracle.com>
@viktorklang-ora
Copy link
Contributor

/reviewers 2

@openjdk
Copy link

openjdk bot commented May 21, 2025

@viktorklang-ora
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

Copy link
Contributor

@viktorklang-ora viktorklang-ora left a comment

Choose a reason for hiding this comment

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

Thanks for your work here, @He-Pin

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Looks good, though I would relax the check on messages to just include the offending variable names to ensure compatible evolution.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 21, 2025
@He-Pin
Copy link
Contributor Author

He-Pin commented May 22, 2025

@viktorklang-ora @liach, I think we need a contribution guide that explains how to set up the work in the IDE, how to perform tests, etc.

@viktorklang-ora
Copy link
Contributor

@He-Pin Please suggest improvements to https://openjdk.org/guide/ 👍

@jdlib
Copy link

jdlib commented May 22, 2025

@viktorklang-ora @liach, I think we need a contribution guide that explains how to set up the work in the IDE, how to perform tests, etc.

This document https://github.com/openjdk/jdk/blob/master/doc/ide.md describes IDE support, but I couldn't find if it is also contained/linked from https://openjdk.org/guide/

@liach
Copy link
Member

liach commented May 22, 2025

There's a Hotspot Development section in the guide, maybe we need one for Java development that talks about IDE and such too.

Copy link
Contributor

@minborg minborg left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@viktorklang-ora
Copy link
Contributor

/integrate

@openjdk
Copy link

openjdk bot commented May 22, 2025

@viktorklang-ora Only the author (@He-Pin) is allowed to issue the integrate command.

@viktorklang-ora
Copy link
Contributor

@He-Pin This PR is now ready to integrate, type "/integrate" (without the quotes) as a comment on this PR.

@viktorklang-ora
Copy link
Contributor

@He-Pin Reminder: Integration needs to be done immediately if this is to make the release train.

@liach
Copy link
Member

liach commented Jun 3, 2025

Or, you can seek to backport this into jdk25u(-dev) repo once RDP1 begin, as if backporting to an LTS release.

@He-Pin
Copy link
Contributor Author

He-Pin commented Jun 4, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 4, 2025
@openjdk
Copy link

openjdk bot commented Jun 4, 2025

@He-Pin
Your change (at version ad67bd1) is now ready to be sponsored by a Committer.

@viktorklang-ora
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 4, 2025

Going to push as commit f141674.
Since your change was applied there have been 2179 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 4, 2025
@openjdk openjdk bot closed this Jun 4, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jun 4, 2025
@openjdk
Copy link

openjdk bot commented Jun 4, 2025

@viktorklang-ora @He-Pin Pushed as commit f141674.

💡 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

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

6 participants