Skip to content

8353197: Document preconditions for JavaLangAccess methods #24982

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 9 commits into from

Conversation

vy
Copy link
Contributor

@vy vy commented May 1, 2025

Document preconditions on certain JavaLangAccess methods that use operations either unsafe and/or without range checks.


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-8353197: Document preconditions for JavaLangAccess methods (Enhancement - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24982

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 1, 2025

👋 Welcome back vyazici! 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 May 1, 2025

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

8353197: Document preconditions for JavaLangAccess methods

Reviewed-by: pminborg, liach

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 71 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 (@minborg, @liach) 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 openjdk bot added the rfr Pull request is ready for review label May 1, 2025
@openjdk
Copy link

openjdk bot commented May 1, 2025

@vy 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 1, 2025
@mlbridge
Copy link

mlbridge bot commented May 1, 2025

@jaikiran
Copy link
Member

jaikiran commented May 7, 2025

Hello Volkan, I checked with others on how to make it prominent, when reading code and when reviewing changes to code, that the usage of these methods needs extra careful attention.

In addition to updating the javadoc of these methods, we came to an agreement that each of these methods should be updated to have unchecked as the prefix in their method names. For example, renaming countPositives(...) to uncheckedCountPositives(...). Even though it means a few additional characters to the method names, this should help catch attention wherever these methods get used.

@minborg
Copy link
Contributor

minborg commented May 8, 2025

/reviewers 2

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.

LGTM

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 8, 2025
@openjdk
Copy link

openjdk bot commented May 8, 2025

@minborg
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).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label May 8, 2025
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.

Reviewed missing copyright updates. Only files with comments need copyright year updates.

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.

Let's re-approve after copyright fix.

@vy
Copy link
Contributor Author

vy commented May 9, 2025

@liach, @minborg, I've fixed the copyright years. I'd appreciate it if you can approve one last time.

This last copyright year fiasco made me do this:

alias git-license-year-violations='git diff --name-only upstream/master...HEAD | { y=$(date +%Y); while read f; do grep -qE "Copyright \\(c\\)( [0-9]{4},)? $y, Oracle" $f || echo $f; done; }'

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.

Latest changes look good.

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.

So, I think we are ready to go with the latest version.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 15, 2025
@vy
Copy link
Contributor Author

vy commented May 15, 2025

Green tier1,2 results are attached to ticket.

/integrate

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

openjdk bot commented May 15, 2025

@vy
Your change (at version 0e06ce1) is now ready to be sponsored by a Committer.

@liach
Copy link
Member

liach commented May 15, 2025

/sponsor

Thanks!

@openjdk
Copy link

openjdk bot commented May 15, 2025

Going to push as commit 8fcfddb.
Since your change was applied there have been 74 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 May 15, 2025
@openjdk openjdk bot closed this May 15, 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 May 15, 2025
@openjdk
Copy link

openjdk bot commented May 15, 2025

@liach @vy Pushed as commit 8fcfddb.

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

8 participants